Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2007 13:42:07 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        wine-freebsd@hub.org, Kris Moore <krismoore@comcast.net>, Matthew Dillon <dillon@apollo.backplane.com>, src-committers@freebsd.org, cvs-src@freebsd.org, Scott Long <scottl@samsco.org>, cvs-all@freebsd.org, Daniel Eischen <deischen@freebsd.org>, Robert Watson <rwatson@freebsd.org>, David Xu <davidxu@freebsd.org>, Tijl Coosemans <tijl@ulyssis.org>, Xin LI <delphij@delphij.net>
Subject:   Re: cvs commit: src/sys/kern kern_thr.c syscalls.master src/sys/sys
Message-ID:  <20070821114207.GC1132@garage.freebsd.pl>
In-Reply-To: <20070820184737.GJ87451@elvis.mu.org>
References:  <200708182118.37998.tijl@ulyssis.org> <20070818204223.D1234@fledge.watson.org> <Pine.GSO.4.64.0708182050070.13363@sea.ntplx.net> <46C7A9A4.5090404@samsco.org> <20070819095302.D66918@fledge.watson.org> <222044094-1187603330-cardhu_decombobulator_blackberry.rim.net-1638751523-@bxe027.bisx.prod.on.blackberry> <46C9AE64.50705@samsco.org> <20070820182905.GH87451@elvis.mu.org> <200708201842.l7KIgAbd040030@apollo.backplane.com> <20070820184737.GJ87451@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--HG+GLK89HZ1zG0kk
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 20, 2007 at 11:47:37AM -0700, Alfred Perlstein wrote:
> * Matthew Dillon <dillon@apollo.backplane.com> [070820 11:43] wrote:
> >     We have a lwp_kill() system call that sends a signal to a thread wi=
thin
> >     a process.  It turns out to be fairly necessary for any sort of hea=
vily
> >     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.
> >=20
> >     int lwp_kill(pid_t pid, lwpid_t tid, int sig);
> >=20
> > 						-Matt
>=20
> It's always bothered me that there wasn't a generation count
> included in the kill(2) interface.
>=20
> What do you think about that?
>=20
> 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.)

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--HG+GLK89HZ1zG0kk
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFGys+PForvXbEpPzQRAht9AKCEmp66NkVksmlZI5AfidLufha5ZACggdmZ
VpThYhiuJlnXyWeDPwDRihI=
=teKn
-----END PGP SIGNATURE-----

--HG+GLK89HZ1zG0kk--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070821114207.GC1132>