[lug] socket programming/kernel question

Bear Giles bgiles at coyotesong.com
Tue Mar 4 17:45:00 MST 2003


Any networking or kernel experts around?

If I have a stream connection and the other side disconnects, my 
process gets an EPIPE signal.  That's simple to catch and use to 
release resources.

But what about a datagram Unix socket?  There's no connection, per 
se, but I can use the SCM_CREDENTIALS to get the PID of the 
caller.  The kernel will know when that process dies.  Is there 
any way for my process to get a signal then an arbitrary process dies?

(Why do I need this?  I'm working on an ephemeral server where 
each process sees the same values every time it calls the server, 
but different processes see different values.  SCM_CREDENTIALS get 
me most of the way there, but Linux reuses pids.)

Bear




More information about the LUG mailing list