@ -801,9 +801,15 @@ ttynew(void) {
close(s);
cmdfd = m;
signal(SIGCHLD, sigchld);
if(opt_io && !(fileio = fopen(opt_io, "w"))) {
if(opt_io) {
fprintf(stderr, "Error opening %s:%s\n",
if(!strcmp(opt_io, "-")) {
opt_io, strerror(errno));
fileio = stdout;
} else {
if(!(fileio = fopen(opt_io, "w"))) {
}