On 03/21/2012 12:45 AM, oliver wrote: > Are there so many bugs in glibc that fixing this one means waiting > in a long, long queue... and bugfixes will need months or years? > > Are there any reasons this bug is not already fixed? > And since when is it known?
Using stdin might be on purpose, this is what a glibc comment says: /* Get name of tty connected to fd 0. Return NULL if not a tty or if fd 0 isn't open. Note that a lot of documentation says that getlogin() is based on the controlling terminal---what they really mean is "the terminal connected to standard input". The getlogin() implementation of DEC Unix, SunOS, Solaris, HP-UX all return NULL if fd 0 has been closed, so this is the compatible thing to do. Note that ttyname(open("/dev/tty")) on those systems returns /dev/tty, so that is not a possible solution for getlogin(). */ --Edwin -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs