Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jun 2008 23:19:19 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Maxim Sobolev <sobomax@freebsd.org>, src-committers@freebsd.org, Ed Schouten <ed@80386.nl>, cvs-src@freebsd.org, cvs-all@freebsd.org, David Xu <davidxu@freebsd.org>
Subject:   Re: cvs commit: src/include Makefile spawn.h unistd.h	src/lib/libc/gen Makefile.inc Symbol.map exec.3 exec.c posix_spawn.c
Message-ID:  <20080617201919.GQ82830@deviant.kiev.zoral.com.ua>
In-Reply-To: <200806171122.41340.jhb@freebsd.org>
References:  <200806170633.m5H6XMJH084600@repoman.freebsd.org> <20080617140600.GE1176@hoeg.nl> <4857D508.8070907@FreeBSD.org> <200806171122.41340.jhb@freebsd.org>

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

--MXxcbiX/Q4+iy5U7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jun 17, 2008 at 11:22:40AM -0400, John Baldwin wrote:
> On Tuesday 17 June 2008 11:15:20 am Maxim Sobolev wrote:
> > Ed Schouten wrote:
> > > * David Schultz <das@FreeBSD.ORG> wrote:
> > >> I have no objections to this, but doesn't it defeat the whole
> > >> purpose to implement posix_spawn() as a library function that just
> > >> calls fork/exec?
> > >=20
> > > When (if?) applications start to use posix_spawn() we may decide to m=
ove
> > > it into the kernel at any time. It should be okay for now.
> >=20
> > Are there any benefits of doing it in the kernel vs. doing it via fork+=
exec?
>=20
> Speed.  You don't have to go mark all your pages as COW or some such only=
 to=20
> turn around and throw the new mappings away and undo that.

The committed implementation uses vfork(). No COW is needed.

On the other hand, after single-threading of the parent process have
been removed from fork1(9), vfork(2) could have interesting consequences
when done from the multithreaded process.

--MXxcbiX/Q4+iy5U7
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkhYHEcACgkQC3+MBN1Mb4jU9ACg755WAFYGlWv7yMUTQDaVmMXX
aU8AoKKl15j6n5JsftOx1x4FTAbMx5Gt
=J1n7
-----END PGP SIGNATURE-----

--MXxcbiX/Q4+iy5U7--



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