Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

Signal Functions
[SB Library]

Signal Functions. More...

Defines

#define MAX_SIGNALS   65
 Maximum number of signals to handle.

Typedefs

typedef void(* sb_signal_handler_t )(int signum)
 Typedef signal handler callback function prototype.

Functions

int sb_signal_init (void)
 Initialize signal module.
int sb_signal_is_initialized (void)
 Function to check, if signal modul was already initialized.
int sb_signal_set_handler (int signum, sb_signal_handler_t handler)
 Install specific signal handler.
int sb_signal_restore_handler (int signum)
 Restore specified signal handler.
int sb_signal_restore_all_handlers (void)
 Restore all signal handlers.

Detailed Description

Signal Functions.

This module provides functions for handling signals.


Function Documentation

int sb_signal_init void   ) 
 

Initialize signal module.

Returns:
0 if successful, -1 if error

Definition at line 43 of file sig.c.

Referenced by sb_signal_is_initialized().

int sb_signal_is_initialized void   ) 
 

Function to check, if signal modul was already initialized.

Returns:
1 if initialized, 0 otherwise

Definition at line 57 of file sig.c.

References sb_signal_init().

Referenced by sb_signal_restore_all_handlers(), sb_signal_restore_handler(), and sb_signal_set_handler().

int sb_signal_restore_all_handlers void   ) 
 

Restore all signal handlers.

Returns:
0 if successful, -1 if error

Definition at line 113 of file sig.c.

References sb_signal_is_initialized(), and sb_signal_restore_handler().

Referenced by main().

int sb_signal_restore_handler int  signum  ) 
 

Restore specified signal handler.

Parameters:
signum signal number to restore
Returns:
0 if successful, -1 if error

Definition at line 95 of file sig.c.

References sb_signal_is_initialized().

Referenced by sb_signal_restore_all_handlers().

int sb_signal_set_handler int  signum,
sb_signal_handler_t  handler
 

Install specific signal handler.

Parameters:
signum signal number to install
handler handler to install for this signal
Returns:
0 if successful, -1 if error

Definition at line 73 of file sig.c.

References sb_signal_handler_t, and sb_signal_is_initialized().

Referenced by main().


Generated on Wed Mar 30 13:43:27 2005 for Mntd by  doxygen 1.3.9.1