(* Release 3.10 *) (*-------------------------------------------------------------------------* * * * SIGNAL.DEF - Modula-2 interface to SIGNAL.H * * * * COPYRIGHT (C) 1989..1992 Clarion Software Corporation. * * All Rights Reserved * * * *--------------------------------------------------------------------------*) DEFINITION MODULE Signal; (*# call(c_conv=>on,result_optional=>on) *) (*# module(implementation=>off,init_code=>off) *) (*# name(prefix=>c) *) TYPE IntFunc = PROCEDURE(INTEGER); CONST NSIG = 23; (* maximum signal number + 1 *) SIGINT = 2; (* interrupt - corresponds to DOS 3.x int 23H *) SIGILL = 4; (* illegal opcode *) SIGFPE = 8; (* floating point error *) SIGSEGV = 11; (* segment violation *) SIGTERM = 15; (* software termination signal from kill *) SIGUSR1 = 16; (* user defined signal 1 *) SIGUSR2 = 17; (* user defined signal 2 *) SIGUSR3 = 20; (* user defined signal 3 *) SIGABRT = 22; (* abnormal termination triggered by abort call *) (* Signal action codes *) SIG_DFL = IntFunc(0); SIG_IGN = IntFunc(1); SIG_SGE = IntFunc(3); SIG_ACK = IntFunc(4); (* Signal error value (returned by signal call on error) *) SIG_ERR = IntFunc(0FFFFH); PROCEDURE raise(_sig:INTEGER); PROCEDURE signal(_sig:INTEGER;_func:IntFunc):IntFunc; END Signal.