Docs » Autodocs » exec.library » SetSignal
SetSignal -- define the state of this task's signals
oldSignals = SetSignal(newSignals, signalMask) D0 D0 D1 ULONG SetSignal(ULONG,ULONG);
This function can query or modify the state of the current task's received signal mask. Setting the state of signals is considered dangerous. Reading the state of signals is safe.
newSignals - the new values for the signals specified in signalSet. signalMask - the set of signals to be affected.
oldSignals - the prior values for all signals EXAMPLES Get the current state of all signals: SetSignal(0L,0L); Clear the CTRL-C signal: SetSignal(0L,SIGBREAKF_CTRL_C); Check if the CTRL-C signal was pressed: #include <libraries/dos.h> /* Check & clear CTRL_C signal */ if(SetSignal(0L,SIGBREAKF_CTRL_C) & SIGBREAKF_CTRL_C) { printf("CTRL-C pressed!\n"); }
Signal(), Wait()
|