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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top