Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!brl-adm!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: calling default signal routines Keywords: signal SIG_DFL Message-ID: <10240@mimsy.UUCP> Date: 19 Jan 88 05:19:47 GMT References: <239@stc-auts.UUCP> Distribution: na Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 21 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. Is there anyway of >calling the default signal handlers? ... >(stop: stop the process, and dump_core: dump core and die) Easy: 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) */ } -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris