Re: fork() race in SIGCHLD handler

From: Pete Zaitcev (zaitcev_at_yahoo.com)
Date: 12/31/03


Date: Tue, 30 Dec 2003 19:33:20 -0800

On Tue, 30 Dec 2003 15:50:29 +0000, P.T. Breuer wrote:

> In comp.os.linux.development.system Chris Vine <chris@cvine--nospam--.freeserve.co.uk> wrote:
>> noticed that the test code below exhibits a timing race on fork() in Linux
>> kernel 2.6.0. If the test code below illustrating the problem is compiled
>
> I recall linus saying that he had changed the order of the first
> process to execute after fork twice in the 2.6.0 series. There was some
> problem such as you detail below, but it went away ages ago with the
> changes made some way back now.

Your recollection matches mine, except that the problem
didn't go away, but was made less likely. As far as I know,
there is nothing one can do, except make parent and child to
communicate in some way.

-- Pete



Relevant Pages

  • Re: fork() race in SIGCHLD handler
    ... >> noticed that the test code below exhibits a timing race on forkin Linux ... > I recall linus saying that he had changed the order of the first ... > process to execute after fork twice in the 2.6.0 series. ...
    (comp.os.linux.development.system)
  • Re: Flame Bait! Windows vs: The Unices
    ... to alter the 'officially provided GUI' to make it more user friendly ... neutral enough that I can run X11 apps on my linux box and display the UI ... > This seems to assume that fork() is the only incompatibility.... ... Thread behaviour is different on many OSs and I'm yet to use a threading ...
    (comp.programming)
  • Re: reiser4 vs politics: linux misses out again
    ... >> of Linux as we know it now. ... > I'm not advocating a fork, I just think it's stupid that so many people ... existing kernel, and/or new features/capabilities not currently available, ... the implied attitude behind your statement actually *guarantees* ...
    (Linux-Kernel)
  • Re: forking a process that has multiple threads
    ... %>% threads at fork as well as only copying the calling thread at fork? ... %>Probably not, as in current Linux implementations, threads are implemented ... % that Linux threaded processes are not true process in the posix sense ... POSIX sense, ...
    (comp.os.linux.development.system)
  • Re: [OT] Web Standards
    ... IE won't run on that Windows variant, I'd have to fork out quite a bit ... If you don't have the hardware to run it, then Linux might not be free ... there often really *are* costs associated with software which is ...
    (comp.os.linux.misc)