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

SetSignal

Define the state of this task's signals

Declaration

Source position: exec.pas line 1914

function SetSignal(

  newSignals: Cardinal;

  signalSet: Cardinal

):Cardinal;

Arguments

newSignals

  

The new values for the signals specified in signalSet.

signalSet

  

The set of signals to be affected.

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