Re: system() using vfork() or posix_spawn() and libthr

2012-08-14 Thread David Xu
On 2012/08/15 05:09, Jilles Tjoelker wrote: On Tue, Aug 14, 2012 at 11:15:06PM +0800, David Xu wrote: But in real word, pthread atfork handlers are not async-signal safe, they mostly do mutex locking and unlocking to keep consistent state, mutex is not async-signal safe. The malloc prefork and p

Re: FreeBSD 1.x Binaries Work Except under Chroot

2012-08-14 Thread Adrian Chadd
Could you do something dirty that lets you reserve PIDs between 0 .. 65534 and then mark a jail as having PIDs only in that space? That way you could run FreeBSD 1.x and 2.x (?) jails with this particular flag set and all processes inside it would use that. (Then handle PID_MAX right for "no proce

Re: system() using vfork() or posix_spawn() and libthr

2012-08-14 Thread Jilles Tjoelker
On Tue, Aug 14, 2012 at 11:15:06PM +0800, David Xu wrote: > But in real word, pthread atfork handlers are not async-signal safe, > they mostly do mutex locking and unlocking to keep consistent state, > mutex is not async-signal safe. > The malloc prefork and postfork handlers happen to work because

Re: system() using vfork() or posix_spawn() and libthr

2012-08-14 Thread David Xu
On 2012/08/14 17:41, Konstantin Belousov wrote: On Tue, Aug 14, 2012 at 05:16:56PM +0800, David Xu wrote: On 2012/08/14 16:18, Konstantin Belousov wrote: On Tue, Aug 14, 2012 at 12:42:15PM +0800, David Xu wrote: I simply duplicated idea from OpenSolaris, here is my patch which has similar feat

Re: FreeBSD 1.x Binaries Work Except under Chroot

2012-08-14 Thread Konstantin Belousov
On Mon, Aug 13, 2012 at 06:28:46PM -0700, Julian Elischer wrote: > On 8/13/12 3:33 PM, Dan Plassche wrote: > >Konstantin, > > > >My apologies for any confusion. Your patch solved the problem on > >8.2. Static and dynamic a.out binaries from 1.1.5.1 are working > >normally in a chroot environment

Re: Disabling ethernet link on an Intel nic?

2012-08-14 Thread Eugene Grosbein
11.08.2012 20:35, David Duchscher пишет: > Greetings, > > I have a need to turn off the link of an ethernet port on a Intel nic. The > issue is not a big deal but one we would like to solve. we have no way of > signaling an upstream router that a path is down but via turning off the link > o

Re: system() using vfork() or posix_spawn() and libthr

2012-08-14 Thread Konstantin Belousov
On Tue, Aug 14, 2012 at 05:16:56PM +0800, David Xu wrote: > On 2012/08/14 16:18, Konstantin Belousov wrote: > >On Tue, Aug 14, 2012 at 12:42:15PM +0800, David Xu wrote: > >>I simply duplicated idea from OpenSolaris, here is my patch > >>which has similar feature as your patch, and it also tries to

Re: system() using vfork() or posix_spawn() and libthr

2012-08-14 Thread David Xu
On 2012/08/14 16:18, Konstantin Belousov wrote: On Tue, Aug 14, 2012 at 12:42:15PM +0800, David Xu wrote: I simply duplicated idea from OpenSolaris, here is my patch which has similar feature as your patch, and it also tries to prevent vforked child from corrupting parent's data: http://people.f

Re: system() using vfork() or posix_spawn() and libthr

2012-08-14 Thread Konstantin Belousov
On Tue, Aug 14, 2012 at 12:42:15PM +0800, David Xu wrote: > I simply duplicated idea from OpenSolaris, here is my patch > which has similar feature as your patch, and it also tries to > prevent vforked child from corrupting parent's data: > http://people.freebsd.org/~davidxu/patch/libthr-vfork.diff