Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!homxb!whuts!picuxa!gp From: gp@picuxa.UUCP (Greg Pasquariello X1190) Newsgroups: comp.unix.wizards Subject: Re: calling default signal routines Summary: use signal Keywords: signal SIG_DFL Message-ID: <456@picuxa.UUCP> Date: 21 Jan 88 13:08:04 GMT References: <239@stc-auts.UUCP> Distribution: na Organization: AT&T Information Systems, Parsippany NJ Lines: 33 In article <239@stc-auts.UUCP>, kak@stc-auts.UUCP writes: > I'd like to call the default signal handlers in my code's signal > handler after fixing up my terminal state. Is there anyway of > calling the default signal handlers? Is there a way of doing > what the default handlers do another way? > (stop: stop the process, and dump_core: dump core and die) > > Kris A. Kugel > Storage Tek: ...{ uunet!nbires, hao, ihnp4 }!stcvax!stc-auts!kak (I'm talking SYS5, I know nothing about BDS ) When your code's signal handler is called, the signal number is passed to it and (except for SIGILL SIGTRAP, and one other (SIGPWR?)) the signal catching function is reset to the default. Therefore, within your signal trap, just generate the same signal when you wish, and the default signal handler will be executed. For example: void sighandler() . . . void sighandler(i) int i { /* do your thing here */ kill(getpid(),i); } Greg Pasquariello picuxa!Tinman!gp