Clarrification about "trap"

  • Thread starter Shamika Ariyawansa
  • Start date
S

Shamika Ariyawansa

Hi,
I know in ruby we use "trap" command to handle OS signals while passing
the signal and the proc object as parameters respectively. when i call
this trap function before any infinite loop it does work perfectly.
Means it listens to the keybord signals and do as i want. But the
problem i have is that im not clear about the way it works... In c++ we
use separate thread to listen for signals and use another thread to run
the program. Is the same scenario happens here with trap
function???..... Please give me a clarification

Thanx in advance
Shamika
 

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
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top