Signal example

K

Karan Rajput

Hi,

Can anybody provide a ruby signal example ?

I am running a simple program contains,

#######################
sleep (10)

trap.Signal('SIGNIT') { proc to handle signal }
#####################

If i will do (Ctrl + c), it should go to proc . But its not working.
Does anybody have working example? Thanks in advance.
 
R

Robert Klemme

2009/11/23 Karan Rajput said:
Hi,

Can anybody provide a ruby signal example ?

I am running a simple program contains,

#######################
sleep (10)

trap.Signal('SIGNIT') { proc to handle signal }
#####################

If i will do (Ctrl + c), it should go to proc . But its not working.
Does anybody have working example? Thanks in advance.

What did you try and what is not working?

Kind regards

robert
 
G

Gennady Bystritsky

Hi,
=20
Can anybody provide a ruby signal example ?
=20
I am running a simple program contains,
=20
#######################
sleep (10)
=20
trap.Signal('SIGNIT') { proc to handle signal }
^^^^^^

Should be SIGINT or just INT.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,439
Latest member
shasuze

Latest Threads

Top