Unit 'exec' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#os4units]

SetSignal

Define the state of this task's signals

Declaration

Source position: exec.pas line 1799

function SetSignal(

  NewSignals: LongWord;

  SignalMask: LongWord

):LongWord;

Arguments

NewSignals

  

The new values for the signals specified in signalSet.

Function result

The prior values for all signals

Description

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.

//Get the current state of all signals
Sig := SetSignal(0, 0);
//Clear the CTRL-C signal:
Sig := SetSignal(0, SIGBREAKF_CTRL_C);
// Check and Clear Ctrl C Signal
if (SetSignal(0, SIGBREAKF_CTRL_C) and SIGBREAKF_CTRL_C) <> 0 then
begin
  writeln('CTRL-C pressed!');
end;
  

See also

Signal

  

Signal a task


Documentation generated on: 2021-07-30