meta, C++


#ifndef  signals_cpp__

#define signals_cpp__

/* Module >>   signals.cpp

   *****************************************************************************

   Authors     GRT

*/

#include for_all.h

#include <signal.h>

/* pure: */ void __cdecl OurSignalHandler
// -----------------------------------------------------------------------------

(

int  s   // the signal   )

    {

    signal( s, SIG_IGN );  switch ( s )  

        {

        case   SIGABRT :  errno = EN_abnormal_termination   ;

        Case   SIGFPE  :  errno = EN_floating_point_error   ;

        Case   SIGILL  :  errno = EN_illegal_instruction    ;

        Case   SIGSEGV :  errno = EN_segmentation_violation ;         // signal 11   Case   SIGTERM :  errno = EN_Ctrl_C_pressed         ;

        Else           :  errno = EN_unknown_signal         ;  

        }
// 

    fprintf( stderr, "\nerrno = %i, signal = %i\n", errno, s );

    exit( errno );

    }

#  endif 



top . is_inc_for . C++
Include-structure of
todir / signals.cpp

.   for_all.h
.   .   exec_ut.h
.   .   .   exec_ut.h3
.   .   .   macros_1.h
.   .   .   traceco.h
.   .   precomp.h
.   .   .   basis.h
.   .   .   .   compiler.h
.   .   .   .   dmlerr.h
.   .   .   en.h
.   .   .   .   en_lec.h
.   .   .   limits.h
.   .   .   mt.h
.   .   .   obsolete.h
.   .   .   ot.h
.   .   .   st.h
.   .   .   trace.h
.   .   standard.h
.   .   toscreen.h

19 include files
top . is_inc_for . C++