Subject: Re: fork(2) vs. pthread_create() (fwd)
To: Emmanuel Dreyfus <manu@netbsd.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-userlevel
Date: 06/10/2004 17:26:22
--NgG1H2o5aFKkgPy/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jun 10, 2004 at 07:05:45AM +0200, Emmanuel Dreyfus wrote:
> Jason Thorpe <thorpej@wasabisystems.com> wrote:
>=20
> > Of course it is still threaded... you simply only have one (the main)
> > thread at the time.
>=20
> Well, at least it's not _multi_threaded anymore.

In terms of POSIX restrictions, you called pthread_create(). You're=20
threaded. Just because you only have one thread right now doesn't change=20
that fact.

> > In any case, your program violates POSIX, so you should fix your=20
> > program.
>=20
> I did that already. But as this works on other systems, and even on
> NetBSD with GNU Pth, I'm sure someone else will get bitten by this
> problem later.

But isn't this "problem" is that the program expects to be able to do
something POSIX doesn't say it can depend on doing? Thus is it really=20
NetBSD's problem?

NetBSD's pthread library is pickier than other pthread libraries, and has=
=20
caught other programming errors before. Even in programs that "worked" in=
=20
other operating systems.

Take care,

Bill

--NgG1H2o5aFKkgPy/
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFAyPwuWz+3JHUci9cRAp9/AKCRLXLqHODktCmfVsnjijt83FuMSwCeOyjc
oVXHUN4csY+8RkMYAWi+uvQ=
=AsZF
-----END PGP SIGNATURE-----

--NgG1H2o5aFKkgPy/--