home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / programm / 4398 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  1.6 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!mips!sdd.hp.com!ux1.cso.uiuc.edu!usenet.ucs.indiana.edu!daimler.ucs.indiana.edu!jackson
  2. From: jackson@daimler.ucs.indiana.edu (Jeff Jackson)
  3. Newsgroups: comp.unix.programmer
  4. Subject: SIGPIPE Delivery on socket close
  5. Keywords: SIGPIPE signal TCP socket
  6. Message-ID: <BtCqCG.DMw@usenet.ucs.indiana.edu>
  7. Date: 21 Aug 92 21:00:15 GMT
  8. References: <1992Aug19.001455.222056@zeus.calpoly.edu>
  9. Sender: news@usenet.ucs.indiana.edu (USENET News System)
  10. Organization: University Computing Services
  11. Lines: 26
  12. Nntp-Posting-Host: daimler.ucs.indiana.edu
  13.  
  14. Greetings,
  15.  
  16. I'm developing a server which needs to time out connections that are
  17. inactive for some specified time. When the server detects that the
  18. timeout period has elapsed, it closes the socket.
  19.  
  20. In the client, after the server has timed out and closed the socket,
  21. I expected to get a SIGPIPE signal the next time I tried a write to 
  22. the socket. What I am finding is that the first write that I do to
  23. the socket completes normally - returning the number of bytes that
  24. were written. Sometimes even the second write will appear to succeed.
  25. Usually however the second or third write causes the SIGPIPE signal, which
  26. is trapped and closes the socket. 
  27.  
  28. What needs to be done to get the SIGPIPE signal the FIRST time I write
  29. to the socket? 
  30.  
  31. Thanks for any clues,
  32.  
  33. JLJ
  34.  
  35. -- 
  36. +---------------------------------------------------------------------------+
  37. | Jeff Jackson         (812) 855-8002       jackson@daimler.ucs.indiana.edu |
  38. | Indiana University   Program for Distributed Computing   Unix Development |
  39. +---------------------------------------------------------------------------+
  40.