Prev: I can't figure out how to trap ctrl-z/ctrl-c in the followingcode (warning:long code)
Next: free tradestation crack download
From: Ersek, Laszlo on 9 Feb 2010 12:44
In article <n6idnTzM7fBXFezWnZ2dnUVZ_sGdnZ2d(a)supernews.com>, Brian Bebeau <bbebeau(a)computer.org> writes:
> On 2/7/2010 11:43 AM, K-mart Cashier wrote:
>> How would I go about trapping ctrl-c/ctrl-z in this case?
> You need to catch the SIGINT and SIGSTOP signals.
You can't catch SIGSTOP, and that is also not what's generated for the
SUSP character -- you mean SIGTSTP (as in "Terminal SToP", I guess).
The system will not allow the action for the signals SIGKILL or
SIGSTOP to be set to SIG_IGN.
The system will not allow a process to catch the signals SIGKILL and
It is not possible to block those signals which cannot be ignored. [...]
> term.c_cc[VSTOP] = \032;
I reckon that would be VSUSP; VSTOP is usually ^S.
If the ISIG flag is set, receipt of the SUSP character causes a SIGTSTP
signal to be sent to all processes in the foreground process group for
which the terminal is the controlling terminal, and the SUSP character
is discarded when processed.
Special character on both input and output, which is recognised if the
IXON (output control) or IXOFF (input control) flag is set. Can be used
to suspend output temporarily. It is useful with CRT terminals to
prevent output from disappearing before it can be read. If IXON is set,
the STOP character is discarded when processed.