Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
signals.h File Reference

Handling signals to abort operation. More...

Go to the source code of this file.

Functions

void signals_init (void)
 
void signals_block (void)
 
void signals_unblock (void)
 Unblock the signals blocked by signals_block().
 
void signals_exit (void)
 

Variables

volatile sig_atomic_t user_abort
 

Detailed Description

Handling signals to abort operation.

Function Documentation

◆ signals_block()

void signals_block ( void )
extern

Block the signals which don't have SA_RESTART and which would just set user_abort to true. This is handy when we don't want to handle EINTR and don't want SA_RESTART either.

◆ signals_exit()

void signals_exit ( void )
extern

If user has sent us a signal earlier to terminate the process, re-raise that signal to actually terminate the process.

◆ signals_init()

void signals_init ( void )
extern

Initialize the signal handler, which will set user_abort to true when user e.g. presses C-c.

◆ signals_unblock()

void signals_unblock ( void )
extern

Unblock the signals blocked by signals_block().

Variable Documentation

◆ user_abort

volatile sig_atomic_t user_abort
extern

If this is true, we will clean up the possibly incomplete output file, return to main() as soon as practical. That is, the code needs to poll this variable in various places.