public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ebb9 at byu dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/31299] getlog returns blanks when not run from the command prompt
Date: Thu, 22 Mar 2007 04:46:00 -0000	[thread overview]
Message-ID: <20070322044604.12376.qmail@sourceware.org> (raw)
In-Reply-To: <bug-31299-14284@http.gcc.gnu.org/bugzilla/>



------- Comment #7 from ebb9 at byu dot net  2007-03-22 04:46 -------
According to POSIX, "The getlogin() function shall return a pointer to a
string containing the user name associated by the login activity with the
controlling terminal of the current process."  The behavior of nohup was
intentionally changed in 5.90, as permitted by POSIX: "If stdin is a
terminal, nohup now redirects it from /dev/null to prevent the command
from tying up an OpenSSH session after you logout."  The difference in
behavior, then, is explainable by the fact that the child app no longer
has a controlling terminal, therefore there is no login user to be found.
 In my mind, this is considered a feature of coreutils' nohup and not a
bug.  And since POSIX permits either behavior (preserving stdin and
keeping a controlling terminal, vs. redirecting stdin and thereby
disassociating from a terminal), it means that getlogin() is not portable
in a nohup environment.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31299


  parent reply	other threads:[~2007-03-22  4:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-21 16:31 [Bug fortran/31299] New: " michael dot a dot richmond at nasa dot gov
2007-03-21 16:50 ` [Bug fortran/31299] " pinskia at gcc dot gnu dot org
2007-03-21 17:00 ` michael dot a dot richmond at nasa dot gov
2007-03-21 17:28 ` burnus at gcc dot gnu dot org
2007-03-21 17:31 ` pinskia at gcc dot gnu dot org
2007-03-21 17:35 ` pinskia at gcc dot gnu dot org
2007-03-21 18:02 ` burnus at gcc dot gnu dot org
2007-03-22  4:46 ` ebb9 at byu dot net [this message]
2007-03-22  7:42 ` burnus at gcc dot gnu dot org
2007-03-22  9:36 ` [Bug fortran/31299] Use getpwuid(geteuid()) instead of getlogin() for GETLOG() burnus at gcc dot gnu dot org
2007-03-22 13:54 ` [Bug fortran/31299] I can produce the bug without using nohup michael dot a dot richmond at nasa dot gov
2007-03-22 15:20 ` pinskia at gcc dot gnu dot org
2007-03-23 21:29 ` [Bug libfortran/31299] Use getpwuid(geteuid()) instead of getlogin() for GETLOG() fxcoudert at gcc dot gnu dot org
2007-03-26  9:33 ` fxcoudert at gcc dot gnu dot org
2007-04-18 16:26 ` dfranke at gcc dot gnu dot org
2007-04-18 16:57 ` fxcoudert at gcc dot gnu dot org
2007-04-18 18:16 ` dfranke at gcc dot gnu dot org
2007-04-18 18:21 ` fxcoudert at gcc dot gnu dot org
2007-04-18 18:39 ` dfranke at gcc dot gnu dot org
2007-04-25  7:36 ` fxcoudert at gcc dot gnu dot org
2007-04-25  7:37 ` fxcoudert at gcc dot gnu dot org
2007-04-25  7:39 ` fxcoudert at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070322044604.12376.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).