Say that a process is running within the main method when a signal is received and handled. When the signal handler is finished, does the process return back to the line in main where the signal was received, or does it return to the signal call?
P.S. I know I can test this quickly myself but this thought occurred to me while I am without access to my PC.
Thanks.
It returns back to where it was in your code when the signal was triggered.
Many libraries and applications exploit the same mechanisms to implement threadless multitasking (for instance libmill).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With