/* ***************************************************************************** * * $RCSfile: sigstuff.h,v $ * $Date: 1998/05/01 16:23:21 $ * $Source: /home/richard/Xml/RCS/sigstuff.h,v $ * $Revision: 1.2 $ * $Author: richard $ * ***************************************************************************** * * Copyright 1998, Brown University and Richard Goerwitz * ***************************************************************************** */ #ifndef SIGSTUFF_H_INCLUDED #define SIGSTUFF_H_INCLUDED #include "general.h" #include #ifndef SIGCHLD # define SIGCHLD SIGCLD #endif #if HAVE_SYS_WAIT_H # include #endif #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif /* install handler for SIGCHLD; see also sig_ignore() below */ void catch_sigchld (RETSIGTYPE (*)(int)); /* blocks SIGINT while SIGTERM is being handled and vice versa */ void catch_sigint_and_sigterm (RETSIGTYPE (*)(int)); /* works like sigset() or signal() */ void sig_catch (int sig, RETSIGTYPE (*)(int)); #ifdef SA_RESTART void sig_catch_no_restart (int sig, RETSIGTYPE (*)(int)); #else # define sig_catch_no_restart sig_catch #endif /* like signal(sig, SIG_IGN), but with special handling of SIGCHLD */ void sig_ignore (int); /* reset signal handler for sig to default */ void sig_default (int); /* like the SYSV sighold() and sigrelse() functions */ void sig_hold (int); void sig_release (int); #endif /* SIGSTUFF_H_INCLUDED */