[hackers] [ubase] Just die if ttyname() fails || sin

From: <git_AT_suckless.org>
Date: Wed, 02 Jul 2014 13:06:20 +0200

commit 53547b783535e2f184875f1b9ca240472b890218
Author: sin <sin_AT_2f30.org>
Date: Wed Jul 2 11:49:03 2014 +0100

    Just die if ttyname() fails

diff --git a/login.c b/login.c
index 3b39902..eca23c8 100644
--- a/login.c
+++ b/login.c
_AT_@ -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));
Received on Wed Jul 02 2014 - 13:06:20 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 02 2014 - 13:12:15 CEST