commit 53547b783535e2f184875f1b9ca240472b890218
parent 2832db2368b7b2e3efa4f1475414e21711cb9d27
Author: sin <sin@2f30.org>
Date: Wed, 2 Jul 2014 11:49:03 +0100
Just die if ttyname() fails
Diffstat:
| M | login.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --dropbox a/login.c b/login.c
@@ -81,7 +81,7 @@ main(int argc, char *argv[])
tty = ttyname(STDIN_FILENO);
if (!tty)
- tty = "?";
+ eprintf("ttyname:");
usr.ut_type = USER_PROCESS;
usr.ut_pid = getpid();
strlcpy(usr.ut_user, argv[0], sizeof(usr.ut_user));