Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!bloom-beacon!gatech!hao!oddjob!matt From: matt@oddjob.UChicago.EDU (Mr. nEtural) Newsgroups: comp.unix.wizards Subject: Re: calling default signal routines Keywords: signal SIG_DFL Message-ID: <14248@oddjob.UChicago.EDU> Date: 19 Jan 88 20:00:04 GMT References: <239@stc-auts.UUCP> <10240@mimsy.UUCP> Distribution: na Organization: Very Little Lines: 19 ) In article <239@stc-auts.UUCP>, kak@stc-auts.UUCP (Kris Kugel) writes: ) >I'd like to call the default signal handlers in my code's signal ) >handler after fixing up my terminal state. ... In article <10240@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: ) catch_sig(sig) ) int sig; ) { ) clean_up(); ) (void) signal(sig, SIG_DFL); ) (void) kill(getpid(), sig); ) /* if we got here, it must have been benign */ ) /* (e.g., stop followed by continue, or SIGCHLD/SIGCLD) */ ) } Don't forget to unmask the current signal, otherwise the explicitly sent signal won't be delivered until some slightly later time. Matt Crawford