Closed p5pRT closed 20 years ago
To: perlbug@perl.com Subject: AIX Piped File Handle Cc: jkaufman@footlocker.com Reply-To: dfaught@footlocker.com
This is a bug report for perl from dfaught@footlocker.com\, generated with the help of perlbug 1.28 running under perl v5.6.0.
----------------------------------------------------------------- Using the following code in a background process causes an error to be generated.
File best1tst.pl contains: #!/usr/local/bin/perl -w print("---DEBUG: $0 got to 1\n"); open (OUTFILE3\, "| cat | best1tst2.pl"); print("---DEBUG: $0 got to 2\n"); close (OUTFILE3);
File best1tst2.pl contains: #!/usr/local/bin/perl print("---DEBUG: $0 got to 1\n");
Invoked by: nohup best1tst.pl >best1.log &
Results in (best1.log contains): ---DEBUG: /home/uedts/bin/best1tst.pl got to 1 who: 0551-012 The process is not attached to a terminal. Do not run who am i as a background process.
Usage: who [-AabdHilmpqrsTtuw] [am {i\,I}] [utmp_like_file] -A Accounting entries -a All (AbdHlprTtu) options -b Boot time -d Dead processes -H Display a Header (title) -l Login processes -m Information about current terminal (same as 'am i') -p Processes other than getty or user process -q Quick (only user and host name) -r Run level -s Short form (suppress Activity and PID) -T\,w Status of tty (+ writable\, - not writable\, x exclusive open\, ? no response) -t Time changes -u\,i Activity and PID of shell ---DEBUG: /home/uedts/bin/best1tst2.pl got to 1 ---DEBUG: /home/uedts/bin/best1tst.pl got to 2
The "who am i" command is coming out of nowhere. There is definitely nothing in this code that is running it. After playing around with this for a while\, I believe that this error has something to do with the fact that there are 2 pipes in the filehandle for OUTFILE3 and the version of AIX that we are running.
I have tried this on the same machine with an older version (4.0) of Perl and got exactly the same result. On a different machine running AIX 4.3.2 and Perl 5.003\, this code runs fine with no errors.
The Perl 5.6.0 which has the problem was installed from the package for AIX from Bull (copied on this email) rather that compiled from source. The AIX that it is actually running on is 4.3.3.
This was an environment issue with the .kshrc file that gets sourced for the subshells\, and has been fixed.
Sorry to clog your bug track\, Pumba (or Timone?).
Migrated from rt.perl.org#8613 (status was 'resolved')
Searchable as RT8613$