On Mon, Aug 20, 2007 at 11:47:37AM -0700, Alfred Perlstein wrote: > * Matthew Dillon <[EMAIL PROTECTED]> [070820 11:43] wrote: > > We have a lwp_kill() system call that sends a signal to a thread within > > a process. It turns out to be fairly necessary for any sort of heavily > > integrated multi-threaded work. In our case we need it to be able to > > issue IPIs (aka SIGUSR1) to cpus within a SMP virtual kernel. > > > > int lwp_kill(pid_t pid, lwpid_t tid, int sig); > > > > -Matt > > It's always bothered me that there wasn't a generation count > included in the kill(2) interface. > > What do you think about that? > > It would be useful for pidfiles to ensure that a recycled pid > doesn't get a program SIGwhatever'd.
I worked on process generation number when I was working on pidfile(3) API. We had discussion about this and consensus was (AFAIR) that we don't need that, because for purpose of pidfile(3) we can use flock(2), which is enough (modulo file systems that doesn't support it). The probably incomplete and never tested patch you can find here: http://people.freebsd.org/~pjd/patches/procbid.patch (I called it process born ID.) -- Pawel Jakub Dawidek http://www.wheel.pl [EMAIL PROTECTED] http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am!
pgpzcDMAj9892.pgp
Description: PGP signature