I realize this is probably a sockets programming question, but I've googled
and experimented, and still can't come up with anything.
I am using Xinetd to implement a simple C++ program that outputs data to the
client.
Upon connect, the program prompts for a couple parameters, then starts
printing out data from a database based on these parameters. Words great.
Until...
If I kill the connection (by killing the telnet client), the program just
keeps happily printing to stdout (as evidenced by top).
The question is: how do I detect when the client disconnects? Even after the
client disconnects, and I can still close and reopen stdout, so that check
doesn't work, and a check on stdout still says it's open, and none of the
writes fail.
Ideas?
Thanks!
j----- k-----
-- Joshua Kugler Assistant Systems Administrator UAF Department of Mathematical Sciences UAF LUG President --------- To unsubscribe, send email to <aklug-request@aklug.org> with 'unsubscribe' in the message body.Received on Wed Apr 28 18:28:28 2004
This archive was generated by hypermail 2.1.8 : Wed Apr 28 2004 - 18:28:31 AKDT