develooper Front page | perl.ithreads | Postings from March 2013

Re: Issues with process forking when 'multithreaded'.

Thread Previous | Thread Next
From:
Mike Pomraning
Date:
March 4, 2013 16:46
Subject:
Re: Issues with process forking when 'multithreaded'.
Message ID:
CAPZFfA8YXVxMGjfUb_QdC5hciCcR2bAaR0n+5-3gBFane4ZTpw@mail.gmail.com
On Mon, Mar 4, 2013 at 10:31 AM, Sander Smeenk <ssmeenk@freshdot.net> wrote:

>
> And i still don't understand why mixing threads+fork is "not smart". ;)
>

Mixing the two makes it easy to introduce damning error.

Here's someone who learned it the hard way:
http://rachelbythebay.com/w/2011/06/07/forked/

Here are some caveats on forking and program state:
http://pubs.opengroup.org/onlinepubs/009696799/functions/pthread_atfork.html#tag_03_486_08

Here's an acknowledgement that the standards folks didn't get all the pesky
semantics quite right:
https://collaboration.opengroup.org/external/pasc.org/interpretations/unofficial/db/p1003.1c/pasc-1003.1c-37.html

-Mike

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About