home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / protocol / tcpip / 4284 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  1.4 KB

  1. Path: sparky!uunet!sun-barr!olivea!hal.com!decwrl!rtech!ingres!sweeney
  2. From: sweeney@Ingres.COM (Tony Sweeney)
  3. Newsgroups: comp.protocols.tcp-ip
  4. Subject: Re: server that won't die (normally)
  5. Message-ID: <1992Sep3.140859.11684@pony.Ingres.COM>
  6. Date: 3 Sep 92 14:08:59 GMT
  7. References: <1992Sep01.205851.29040@mixcom.com>
  8. Reply-To: sweeney@Ingres.COM (Tony Sweeney)
  9. Distribution: usa
  10. Organization: Ask Computer Systems Inc., Ingres Division, Alameda CA 94501
  11. Lines: 30
  12.  
  13. In article <1992Sep01.205851.29040@mixcom.com> mgic@mixcom.mixcom.com (mgic) writes:
  14. >
  15. >System: RS/6000 AIX 3.2.1
  16. >
  17. >I've written a server that is started by inetd, reading
  18. >and writing stdin and stdout.
  19. >
  20. >The server uses select() to determine when data is
  21. >ready to be read. If an (socket) error is detected, 
  22. >the server quits.
  23. >
  24. >The problem is that the server never dies if the client
  25. >quits abnormally. When the client quits normally, it sends
  26. >the server an "end of session" message, and the server quits normally.
  27. >
  28. >Why isn't the server being informed that the client no longer exists
  29. >so that select() will report an error? Or, what method should
  30. >be used to determine if the stream no longer exists?
  31. >
  32. You want to setsockopt(..., ..., SO_KEEPALIVE, ..., ...); The select will
  33. (eventually) return an error. Note that the keepalive time is a kernel
  34. parameter and cannot be set by the user.
  35. >Thank you.
  36. >
  37. >Dean
  38. >-- 
  39.  
  40. Hope this isn't too wide of the beam.
  41.  
  42. Tony.
  43.