[lug] socket programming/kernel question

Zan Lynx zlynx at acm.org
Tue Mar 4 22:35:47 MST 2003



On Tue, 2003-03-04 at 18:53, Bear Giles wrote:
> Zan Lynx wrote:
> > I don't think you can with a datagram socket.  Try using a stream Unix
> > socket and see what happens.
> 
> Stream sockets don't really match the problem.  I'm not saying I 
> couldn't make a gatekeeper work, just that it would be very 
> artificial.

Then you won't get notification of connection termination.  I did notice
that you compared a TCP stream socket to a Unix datagram socket.  A UDP
datagram socket will not give you connection termination notice either. 
Because there is no connection.

You might be able to use two sockets, one datagram and one stream.  Or
use the ptrace functions to attach to the process of interest and watch
for its exit.  Or start every special process from one parent and look
for its parent process id to validate the children.

-- 
Zan Lynx <zlynx at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20030304/30d0c21e/attachment.pgp>


More information about the LUG mailing list