Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Get the current function used to handle control+z

by friedo (Prior)
on Dec 14, 2008 at 07:46 UTC ( #730260=note: print w/ replies, xml ) Need Help??


in reply to Re: Get the current function used to handle control+z
in thread Get the current function used to handle control+z

It's a little clunky, but you can do the kill from within perl by counting SIGSTOP's position in $Config{sig_name} (which, unfortunately, is a space-separated list rather than an array.)

perl -MConfig -le 'for( split /\s/, $Config{sig_name} ) { last if /^STOP$/; $n++ } kill $n, $$'
This just counts signal names until it gets to STOP, and $n will contain the right number.


Comment on Re^2: Get the current function used to handle control+z
Select or Download Code
Re^3: Get the current function used to handle control+z
by zwon (Monsignor) on Dec 14, 2008 at 11:13 UTC
    There's no need to search signal number in $Config
    kill STOP => $$;
    will work just fine.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2014-09-16 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (36 votes), past polls