> It seems to return not 0, but undef.  And $! is set to "Interrupted
> system call".
> 
> Does this help?  Perhaps you could just restart the loop in such cases.

Thanks to Ken, Joel and drieux for the suggestions.

I take if from your responses that Perl doesn't automatically restart system
calls after a signal is processed as Programming Perl and the Perl Cookbook
suggest it does.

I don't actually own the code that is doing the read, so its not easy for me
to modify it.

This is happening within my Perl debugger code.  It could be any blocking
system call (read/write/flock/select, etc.).  I use a signal to get my
debugger's attention so that I can set/clear a breakpoint or whatever while
the client script is otherwise occupied.  From the user script's
perspective, I want it to appear as if the signal never happened.

Cheers
-Mark

---------------------------------------------------------------------
Mark Alldritt                         Late Night Software Ltd.
Phone: 250-380-1725                   333 Moss Street
FAX:   250-383-3204                   Victoria, B.C.
WEB:   http://www.latenightsw.com/    CANADA  V8V-4M9
AIM:   markalldritt

Reply via email to