Re: Practice of using fork()

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 07/22/05


Date: Thu, 21 Jul 2005 21:31:39 -0400

In article <m3irz3k5q0.fsf@localhost.localdomain>, joe@invalid.address
wrote:

> Surely you can, if you know what to do first. It's perfectly
> reasonable to call fork() without calling exec(), and do some pretty
> non-trivial stuff. The trick is knowing how things work on the
> platform being used. That could be said of most things in
> programming.

The problem is that it can be difficult to perform this trick, since the
issues that have been brought up are almost universally undocumented.
As a result, they're also subject to change from release to release.

Furthermore, POSIX programming is supposed to be portable. Does POSIX
ever suggest that there's a problem calling any of these functions
across forks? This is a pretty annoying gotcha.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


Relevant Pages