I have a perl script that calls waitpid, that doesn't seem to work at all on VMS. A simple test case like the following:
----
use POSIX ":sys_wait_h";


my $reap1 = waitpid("53CCDA08",&WNOHANG);
print "Exit = $?\n";
print "REAP = $reap1\n";
-------

simply prints out
---
Exit = 256
REAP = 53
---
regardless of whether the process with PID 53CCDA08 (in example above) exists or not. Is it required that the targeted waitpid process be a subprocess of the current process calling waitpid() ?


On Unix platforms, they are able to 'reap' a process that has already exited and get its final exit status? Is this feasible on VMS? If not, how do I emulate this situation, other than the ugly method of having the exiting application write it's status to a file on disk which I can go in and check? (This is ugly because there's potential for this to cause confusion, when sometimes the process could crash and can't write out the exit status.)

Thanks,
Sam



Reply via email to