Date: Wed, 24 Mar 2010 11:56:34 -0400 From: Pierre-Luc Drouin <pldrouin@pldrouin.net> To: Daniel Eischen <deischen@freebsd.org> Cc: freebsd-threads@freebsd.org Subject: Re: Portable Conditional Wait for Inter-Process? Message-ID: <4BAA3632.7030309@pldrouin.net> In-Reply-To: <Pine.GSO.4.64.1003221153140.9723@sea.ntplx.net> References: <4BA64260.5000009@pldrouin.net> <Pine.GSO.4.64.1003211246350.5093@sea.ntplx.net> <4BA6A2C5.3030808@pldrouin.net> <Pine.GSO.4.64.1003221153140.9723@sea.ntplx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, finally what I did is to create an array in a shared memory segment (I was already using shared memory for these processes) where I write the PIDs of the waiters such that the other process can SIGALRM them when it is ready. The waiters wait for this signal with sigtimedwait and the other process SIGALRM them as well if a signal is sent to it. I use a lock-free algorithm with atomic primitives to save and load the PIDs to the shared segment. It seems to be working quite well. Thanks Daniel Eischen wrote: > On Sun, 21 Mar 2010, Pierre-Luc Drouin wrote: > >> Regarding process groups, how can I set two processes to belong to >> the same process group if they don't have a parent-child relation? >> >> Thanks! > > Well, from skimming the man pages, I don't think you can > do that. You can't somehow launch your clients and server from > the same parent? >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BAA3632.7030309>