[Bug fortran/31299] getlog returns blanks when not run from the command prompt
--- Comment #8 from burnus at gcc dot gnu dot org 2007-03-22 07:42 --- Close as Won't Fix -- burnus at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31299
[Bug fortran/31299] getlog returns blanks when not run from the command prompt
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-03-21 16:49 --- This works for me: [EMAIL PROTECTED]:~$ nohup ./a.out nohup: appending output to `nohup.out' [EMAIL PROTECTED]:~$ !c cat nohup.out Hello apinski What OS are you running with? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31299
[Bug fortran/31299] getlog returns blanks when not run from the command prompt
--- Comment #2 from michael dot a dot richmond at nasa dot gov 2007-03-21 16:59 --- Subject: Re: getlog returns blanks when not run from the command prompt I am running SuSE Linux 10.2 At 12:49 PM 3/21/2007, you wrote: --- Comment #1 from pinskia at gcc dot gnu dot org 2007-03-21 16:49 --- This works for me: [EMAIL PROTECTED]:~$ nohup ./a.out nohup: appending output to `nohup.out' [EMAIL PROTECTED]:~$ !c cat nohup.out Hello apinski What OS are you running with? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31299 --- You are receiving this mail because: --- You reported the bug, or are watching the reporter. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31299
[Bug fortran/31299] getlog returns blanks when not run from the command prompt
--- Comment #3 from burnus at gcc dot gnu dot org 2007-03-21 17:27 --- I can reproduce this. With g95 it shows also with nohup the login, whereas with gfortran, sunf95 and ifort it does not. gfortran calls: char *getlogin(void) g95 calls: getpwuid(getuid())-pw_name -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31299
[Bug fortran/31299] getlog returns blanks when not run from the command prompt
--- Comment #4 from pinskia at gcc dot gnu dot org 2007-03-21 17:31 --- The only thing I can think of this is really a glibc issue and/or a shell issue as it works for me with debian. Ok, I can reproduce it with bash on FC5 (I think it is FC5) but it works with csh as the shell. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31299
[Bug fortran/31299] getlog returns blanks when not run from the command prompt
--- Comment #5 from pinskia at gcc dot gnu dot org 2007-03-21 17:34 --- This is not a shell issue either, it is just csh/tcsh has nohup as a builtin :). Anyways this is a bug with coreutils. coreutils 5.2.1's nohup works coreutils 5.93's nohup does not. You should report this bug to them. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31299
[Bug fortran/31299] getlog returns blanks when not run from the command prompt
--- Comment #6 from burnus at gcc dot gnu dot org 2007-03-21 18:02 --- (In reply to comment #5) Anyways this is a bug with coreutils. coreutils 5.2.1's nohup works coreutils 5.93's nohup does not. You should report this bug to them. I reported it now, cf. http://lists.gnu.org/archive/html/bug-coreutils/2007-03/index.html (archive refreshed every 12h) As gfortran (ifort,sunf95) correctly call the POSIX function getlogin(), I think one can close this bug. Or does anyone think that we should work around this bug? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31299
[Bug fortran/31299] getlog returns blanks when not run from the command prompt
--- 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