On Sep 6, 2008, at 11:57 PM, Craig A. Berry wrote:
On Sat, Sep 6, 2008 at 5:58 PM, John E. Malmberg <[EMAIL PROTECTED]>
wrote:
We need to have a method of killing the Perl process with out
killing the
shell on VMS.
What I ended up doing is making it send a SIGTERM rather than SIGKILL
on VMS. That seems to make Perl bail out nicely but doesn't take down
the process it's running from.
But this is all downstream of the immediate problem, which is that
in the watchdog() function in t/test.pl, the C<sleep(120)> call
returns in one second, not 120, and I've verified in the debugger
that Perl_pp_sleep in pp_sys.c does actually get an integer value of
1 and passes it along to the sleep() in the C run-time.
The sleep() I was observing from the debugger was from a different
thread. I'm still not sure why the one in the watchdog was waking up
early, but I put in code to make it requeue itself if that happens:
http://public.activestate.com/cgi-bin/perlbrowse/p/34316
The only documented reason I could find for sleep() waking up early is
if an alarm fires, which could happen for any number of reasons, not
the least of which is that sleep() may be implemented via alarms:
http://www.opengroup.org/onlinepubs/000095399/functions/sleep.html
________________________________________
Craig A. Berry
mailto:[EMAIL PROTECTED]
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser