tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Proposal: killpeer(2)



On Sun, May 15, 2011 at 06:13:48PM +0200, Joerg Sonnenberger wrote:
 > > > How about adding fcntl(F_GETPEER) returning pid_t, then you can do
 > > > kill(fcntl(fd, F_GETPEER))?
 > > 
 > > There's still a race -- if your process sleeps between the fcntl
 > > and the kill system calls, you can kill the wrong process or nothing.
 > 
 > How is that different from pkill usage or pretty much any other case not
 > involving a directly related process?

It's not; the point is to fix that race.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index