home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!sdd.hp.com!hplabs!felix!fritz!scotth
- From: scotth@felix.filenet.com (Scott Hopson)
- Newsgroups: comp.lang.c
- Subject: Re: Questions on kill signal
- Message-ID: <20996@fritz.filenet.com>
- Date: 21 Nov 92 17:35:06 GMT
- References: <1992Nov19.093605.11370@nuscc.nus.sg>
- Reply-To: scotth@fritz.filenet.com (Scott Hopson)
- Organization: FileNet Corp., Costa Mesa, CA
- Lines: 17
-
- In article <1992Nov19.093605.11370@nuscc.nus.sg> isc40038@nusunix1.nus.sg (LIM FANG HOW) writes:
- >How to implement a process that when receives a kill signal from the
- >shell, will write some characters into a text file ?
- >
- >P.S :
- > This process must be able to receive the kill signal at any point.....
-
- Are you refering to a kill -9 PID ? If so then I think your out of luck,
- this would require that your process be able to trap SIGKILL which is not
- allowed. If your'e refering to other signals then you can use 'signal' to
- trap the signal and perform your required functions. For info on trapping
- signals just read the man page, it should provide all you need.
-
-
-
- --
- Scott Hopson (scotth@filenet.com)
-