X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=tests%2Fttyemu.c;h=27fed9af2323fa5a29e7a2f497f6ba14422dc2cb;hb=0e0a852e9115da076d482d0a7fb6abe8bd7e2b78;hp=9137290bc3630c80acf57a086bc6d9427dd8337b;hpb=b0902369e789c9aadf584799889a34637688d601;p=chaz%2Ftar diff --git a/tests/ttyemu.c b/tests/ttyemu.c index 9137290..27fed9a 100644 --- a/tests/ttyemu.c +++ b/tests/ttyemu.c @@ -188,7 +188,7 @@ noecho (int fd) to.c_cc[VEOF] = C_EOT; if (tcsetattr (fd, TCSAFLUSH | TCSASOFT, &to)) { - perror ("tcgetattr"); + perror ("tcsetattr"); exit (EX_ERR); } } @@ -349,8 +349,9 @@ main (int argc, char **argv) close (i); setsid (); +#ifdef TIOCSCTTY ioctl (0, TIOCSCTTY, 1); - +#endif execvp (argv[0], argv); perror (argv[0]); _exit (EX_EXEC);