2004 by Marc J. Rochkind. All rights reserved. Portions marked "Open Source" may be copied under license.

 

Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

c9/sigmin.c File Reference


Detailed Description

Minimal defensive signal handling [Sec. 9.1.8].

Definition in file sigmin.c.

Go to the source code of this file.

Defines

#define MAX_SIG   50

Functions

void clean_up (void)
size_t strlen_safe (const char *s)
void handler (int signum)
bool handle_signals (void)
void process (void)
int main (void)


Define Documentation

#define MAX_SIG   50
 

Definition at line 111 of file sigmin.c.

Referenced by main().


Function Documentation

void clean_up void   )  [static]
 

Definition at line 23 of file sigmin.c.

Referenced by handler(), and sig_thread().

bool handle_signals void   )  [static]
 

Definition at line 68 of file sigmin.c.

References EC_CLEANUP_BGN, EC_CLEANUP_END, ec_neg1, handler(), sigaction::sa_handler, sigaction::sa_mask, set(), sigaction(), sigemptyset(), sigfillset(), and sigprocmask().

Referenced by process().

void handler int  signum  )  [static]
 

Definition at line 39 of file sigmin.c.

References _exit(), clean_up(), strlen_safe(), and write().

Referenced by handle_signals().

int main void   ) 
 

Definition at line 113 of file sigmin.c.

References EC_CLEANUP_BGN, EC_CLEANUP_END, ec_neg1, exit(), fork(), kill(), MAX_SIG, process(), set(), sigfillset(), sigprocmask(), sleep(), and waitpid().

void process void   ) 
 

Definition at line 100 of file sigmin.c.

References EC_CLEANUP_BGN, EC_CLEANUP_END, ec_false, exit(), handle_signals(), and sleep().

Referenced by main().

size_t strlen_safe const char *  s  )  [static]
 

Definition at line 31 of file sigmin.c.

Referenced by handler().


Generated on Fri Apr 23 10:57:11 2004 for AUP2 Example Source by doxygen 1.3.1