Just die if ttyname() fails

This commit is contained in:
sin 2014-07-02 11:49:03 +01:00
parent 2832db2368
commit 53547b7835
1 changed files with 1 additions and 1 deletions

View File

@ -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));