aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/st.c b/st.c
index fd5e0fd..7852de0 100644
--- a/st.c
+++ b/st.c
@@ -801,9 +801,15 @@ ttynew(void) {
801 close(s); 801 close(s);
802 cmdfd = m; 802 cmdfd = m;
803 signal(SIGCHLD, sigchld); 803 signal(SIGCHLD, sigchld);
804 if(opt_io && !(fileio = fopen(opt_io, "w"))) { 804 if(opt_io) {
805 fprintf(stderr, "Error opening %s:%s\n", 805 if(!strcmp(opt_io, "-")) {
806 opt_io, strerror(errno)); 806 fileio = stdout;
807 } else {
808 if(!(fileio = fopen(opt_io, "w"))) {
809 fprintf(stderr, "Error opening %s:%s\n",
810 opt_io, strerror(errno));
811 }
812 }
807 } 813 }
808 } 814 }
809} 815}