home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / question / 15811 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  1.5 KB

  1. Path: sparky!uunet!olivea!spool.mu.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!void!ejohnson
  2. From: ejohnson@void.ncsa.uiuc.edu (Eric E. Johnson)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: Sockets: How do I detect when it has unexpectedly closed
  5. Message-ID: <ejohnson.727639716@void>
  6. Date: 21 Jan 93 18:08:36 GMT
  7. References: <1993Jan13.040639.18416@slate.mines.colorado.edu> <1993Jan15.174830.2021@bvl.pt> <ejohnson.727557988@void>
  8. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  9. Organization: University of Illinois at Urbana
  10. Lines: 22
  11.  
  12. ejohnson@void.ncsa.uiuc.edu (Eric E. Johnson) writes:
  13.  
  14. >Well, I've tried using the signal function to catch SIGPIPE, but my
  15. >sockets aren't even generating SIGPIPES when I'm writing to them, and
  16. >yet they're supposedly disconnected.
  17.  
  18. >Obvious possibilities include... is my signal function set up correctly?
  19. >Yep, because it does respond to control-c's.  Is the signal currently
  20. >masked out via sigmask?  No, I checked that.
  21.  
  22. >Anything else?
  23.  
  24. I decided to investigate the source code to netstat.  It seems that
  25. netstat knows more about the state of my socket than I do.  I've got the
  26. source code to netstat, unfortunately, it finds the state of my socket
  27. by reading memory from the kernel.  If I do get find out how to properly
  28. use the kvm_read command to find the netstat info, I'll post to the
  29. group.
  30.  
  31. -- 
  32. Eric E Johnson             | "The uncontested absurdities of today are the
  33. ejohnson@a.cs.uiuc.edu     |  accepted slogans of tomorrow." - Ayn Rand
  34.