home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 16957 < prev    next >
Encoding:
Internet Message Format  |  1992-11-21  |  1.1 KB

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