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

Re: Issues with process forking when 'multithreaded'.

Thread Previous | Thread Next
From:
Sander Smeenk
Date:
March 4, 2013 15:32
Subject:
Re: Issues with process forking when 'multithreaded'.
Message ID:
20130304153213.GB9656@dot.freshdot.net
Quoting Sander Smeenk (ssmeenk@freshdot.net):

> In fact, it does work, for 95% of all threads it works as designed, only
> a select few (but not the same) threads fail each time, i was hoping to
> find out why only this small portion of threads fail their waitpid() call. ;)

Also, this might not be clear from my original message, the main process
is the process that creates the threads, one for each server that needs
to be backed up. Each thread calls fork() only once (through open3) for
the rsync to do the heavy lifting.

So, it's not a fork() from the main process (which would perhaps
copy all threads to the fork()ed process, or maybe not, who knows).

Amazing there is so little known about what this does / how this works,
i'll see if i can get a working testcase instead of the snipped i
pasted.

-Sndr.
-- 
| One tequila, two tequila, three tequila, floor.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7  FBD6 F3A9 9442 20CC 6CD2

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