GNU bug report logs - #18365
nohup logname failes with error "logname: no login name"

Previous Next

Package: coreutils;

Reported by: Allen.Shepherd <Allen.Shepherd <at> target.com>

Date: Sat, 30 Aug 2014 17:08:01 UTC

Severity: normal

Tags: notabug

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 18365 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: "Allen.Shepherd" <Allen.Shepherd <at> target.com>
Cc: 18365 <at> debbugs.gnu.org
Subject: Re: bug#18365: nohup logname failes with error "logname: no login
 name"
Date: Mon, 01 Sep 2014 16:04:22 +0100
tag 18365 notabug
close 18365
stop

On 08/30/2014 05:37 PM, Allen.Shepherd wrote:
> Hi we cannot retrieve the login name with the below version while running with nohup.
> Is there any workaround available?
> Thanks,
> 
> 
> host.com(oracle:NONE)/: logname --version
> logname (GNU coreutils) 5.97
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software.  You may redistribute copies of it under the terms of
> the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
> There is NO WARRANTY, to the extent permitted by law.
> Written by FIXME: unknown.

POSIX states that logname should be a simple wrapper around getlogin():
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/logname.html

getlogin() may fail on some systems if stdin is redirected from the controlling tty

thanks,
Pádraig.




This bug report was last modified 10 years and 351 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.