At 1:37 PM +0100 5/31/01, [EMAIL PROTECTED] wrote:
>I'm spawning a process from within a perl script and then doing a waitpid
>on it and checking the return status,
>I am looking at $? which appears to return the pid and a status in the
>next 8 bits.
Sample code? I think I know what you mean but a simple reproducer
always helps.
>However I really need to see the VMS exit status , the documentation
>perlvms.pod seems to suggest that this will be contained in $^S
>however it appears to be always blank. ( perl version 5.6.1)
>
>Is the VMS exit status available ?
Ed's suggestion might be what you need, e.g. the confusing POSIX exit
status you get by default vs. the VMS exit status you get with "use
vmsish status;":
$ perl -e "$x=system('notacommand'); exit($x);"
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\NOTACOMMAND\
%SYSTEM-W-ILLSER, illegal service call number
$ perl -e "use vmsish status; $x=system('notacommand'); exit($x);"
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
\NOTACOMMAND\
%DCL-W-IVVERB, unrecognized command verb - check validity and spelling
>Aplogies for asking silly questions, but I'm finding the perlvms.pod to be
>less than 100% accurate.
It's not silly, and quite possibly you've found a genuine bug. We
introduced our own popen implementation last summer and perhaps lost
the $^S magic in the process, or perhaps it never worked, or . . .
I'll try to look into it.
--
____________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]
"Literary critics usually know what they're
talking about. Even if they're wrong."
-- Perl creator Larry Wall