Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Why is perl not honouring SIGSTOP?

by Marshall (Canon)
on Mar 10, 2012 at 04:16 UTC ( [id://958831]=note: print w/replies, xml ) Need Help??


in reply to Why is perl not honouring SIGSTOP?

This is an OS question, not a Perl question. What OS are you running? Perl can install signal handlers just like a C program can. Perl, like all other programs normally has nothing to do with CTL-Z.

Replies are listed 'Best First'.
Re^2: Why is perl not honouring SIGSTOP?
by PerlOnTheWay (Monk) on Mar 10, 2012 at 04:19 UTC
    I'm on Ubuntu . Isn't OS supposed to STOP the process for SIGSTOP(the process is put in a TASK_STOPPED state)?

    The SIGKILL and SIGSTOP signals cannot be explicitly ignored or caught, and thus their default actions must always be executed. Therefore, SIGKILL and SIGSTOP allow a user with appropriate privileges to destroy and to stop

    seems actually not a perl question, but anyone knows the reason?

      SIGSTOP (19) - Stop process is an OS function. Perl plays (normally) no role in this. Of course it is possible to make a program do things like my text editor which interprets CTL-Z to mean "undo the last change". But basically, no Perl doesn't have anything to do with that.
      Well, I don't know but there may some strange behavior related to how Ubuntu handles sleep? If you put your Perl program into an tight loop, or have it do an blocking IO operation or have it read a big disk file line by line, I betcha CTL-Z will do something. Is this a real application question or just intellectual curiosity? Perl itself is not going to do anything with CTL-Z without a lot more code than 2 lines!

Log In?
Username:
Password:

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

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

    No recent polls found