[hackers] [ubase] Don't die on vhangup() failure || sin
commit 48b505fad321ecab5a6360fd7b92e1e7a85e3d63
Author: sin <sin_AT_2f30.org>
Date: Tue Feb 11 10:14:09 2014 +0000
Don't die on vhangup() failure
We might be able to continue at this point.
diff --git a/getty.c b/getty.c
index 46781f6..ad15279 100644
--- a/getty.c
+++ b/getty.c
_AT_@ -59,12 +59,11 @@ main(int argc, char *argv[])
eprintf("open %s:", tty);
if (isatty(fd) == 0)
eprintf("%s is not a tty
", tty);
- if (ioctl(fd, TIOCSCTTY, (void *)1) == 0) {
- if (vhangup() < 0)
- eprintf("vhangup:");
- } else {
+ if (ioctl(fd, TIOCSCTTY, (void *)1) == 0)
+ vhangup();
+ else
fprintf(stderr, "could not set controlling tty
");
- }
+
close(fd);
fd = open(tty, O_RDWR);
if (fd < 0)
Received on Tue Feb 11 2014 - 11:16:20 CET
This archive was generated by hypermail 2.3.0
: Tue Feb 11 2014 - 11:24:12 CET