home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / question / 14774 < prev    next >
Encoding:
Internet Message Format  |  1992-12-17  |  1.3 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!sdd.hp.com!usc!news.service.uci.edu!cerritos.edu!swc!wndrsvr!andyb
  2. From: andyb@wndrsvr.la.ca.us (Andy Brager)
  3. Newsgroups: comp.unix.questions
  4. Subject: Problem with SIGHUP handler. ISC V.3 3.0
  5. Message-ID: <BzAM1p.MqC@wndrsvr.la.ca.us>
  6. Date: 15 Dec 92 08:53:49 GMT
  7. Organization: Wonder Server - Public Access for SoCal
  8. Lines: 17
  9.  
  10. I have a strange problem with signal(2).  As soon as I
  11. call signal(2) with the address of the handler for SIGHUP, it jumps 
  12. to the handler.  On checking the signal number passed into
  13. the handler and also errno, they are both zer0.  If not for a 
  14. wait(2) the program would exit immediately.  If I remove
  15. the call to signal(2), the code behaves as expected (ie. does not call
  16. the handler).  A similar signal using alarm(2) and SIGALRM works just 
  17. fine (doesn't go to the handler until a SIGALRM occurs).  I am 
  18. somewhat baffled.   Rather than burdening the net with code, please 
  19. write me if you have any ideas.  Thank you!
  20.  
  21. -  Andy
  22. -- 
  23.            DO NOT BUY TOUCHE COMPUTERS -email for details
  24.       Large Packages (2K+ Total): cerritos.edu!swc!wndrsvr!andyb
  25.    -I don't know but I been told; two sides to every story - Joe Walsh
  26. [    This Space For Rent - No children, pets, or toxic waste dumps please.     ]
  27.