Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Why is perl not honouring SIGSTOP?

by tchrist (Pilgrim)
on Mar 10, 2012 at 04:54 UTC ( [id://958834]=note: print w/replies, xml ) Need Help??


in reply to Why is perl not honouring SIGSTOP?

^Z is (typically) bound to SIGTSTP, which is catchable, not to SIGSTOP, which isn’t.

Replies are listed 'Best First'.
Re^2: Why is perl not honouring SIGSTOP?
by PerlOnTheWay (Monk) on Mar 10, 2012 at 05:24 UTC
    Both SIGSTOP and SIGTSTP should STOP the process by default.
      I am using Ubuntu and perl can be stoped with SIGTSTP and then be resumed without problem.

      Tried with this prog: $ perl -E 'for (0..100) { say; sleep 1};'

      I was asked my Marshall in a message to try to sleep for longer times. It seems sleep sets a time when it should wake up again and while SIGTSTP does stop the process it does not stop the passing of time. (I am guessing about how sleep works.) If you want different behaviour you have to replace sleep() with something else.

      $ perl -E 'for (0..100) { say "$_: ". time %100;sleep 33;}'

      Well we are back in the circle again. Perl does not do a darn thing with these signals. Expand your test program: sleep, do something, sleep, do something, sleep, do something...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://958834]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (9)
As of 2024-04-24 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found