bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils 5.2.1 -> 5.93 regression: With nohup getlogin() returns NU


From: Evan Hunt
Subject: Re: coreutils 5.2.1 -> 5.93 regression: With nohup getlogin() returns NULL
Date: Thu, 22 Mar 2007 09:17:41 -0700
User-agent: Mutt/1.5.10i

> Can you provide an example where this would be useful?

When I use nohup, I'm generally either using it as an insurance policy, to
prevent some lengthy process from getting killed by a flaky network
bringing down my telnet or ssh session, or else I'm using it to run
a logging process.

In the former case, I expect the process to behave the same as it would
any other time, except immune to SIGHUP--even if it calls getlogin(),
or 'tty', or needs a controlling terminal for some other reason.

In the latter, I might actually want to log activity on a tty.  In a past
life as a PPP engineer, I used to have a script that ran "stty -a" every
second and logged the output, and I'd run it before initiating a PPP
connection, with standard input redirected from the modem tty, and keep
track of the tty settings as they changed during the course of the
connection.  If I'm not mistaken, "nohup sttylog < /dev/ttyXX" wouldn't
work now; it'd be silently turned into "nohup sttylog < /dev/null".
(This isn't hard to work around, but then again it isn't hard to add
a --keeptty option to nohup, either.)

These are corner cases, but it's easy to support them, and as far as I
know POSIX doesn't have a problem with it.  Is there a downside I'm not
seeing?

Evan Hunt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]