[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nohup breaks logname and tty commands
From: |
Andreas Schwab |
Subject: |
Re: nohup breaks logname and tty commands |
Date: |
Fri, 22 Feb 2008 17:54:43 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux) |
Eric Blake <address@hidden> writes:
> According to ROTH, MATTHEW G (ATTSI) on 2/22/2008 9:06 AM:
> | In RHEL 5 with coreutils 5.97 the following does not work:
> |
> | $ /usr/bin/nohup /usr/bin/logname
> | /usr/bin/nohup: appending output to `nohup.out'
> |
> | $ cat nohup.out
> | /usr/bin/logname: no login name
>
> I'm not sure why that is failing for you. It worked just fine for me:
> $ logname
> eblake
> $ nohup logname
> nohup: ignoring input and appending output to `nohup.out'
> $ cat nohup.out
> eblake
> $ nohup --version | head -n1
> nohup (GNU coreutils) 6.10
> $ logname --version | head -n1
> logname (GNU coreutils) 6.10
>
> Perhaps an strace would shed some light?
That appears to be a bug in glibc in that getlogin uses the terminal
connected to stdin instead of the controlling terminal.
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."