Hi,
I'm new on this list, not sure if this is the right place for this,
please redirect me if this is not on topic here. ;)
I am seeing issues with open3()/waitpid() calls when running the same
code as multiple threads - this does not happen with a single thread
running the code - i'm not sure wh
For the most part, threads and forks are not compatible. Therefore, you
probably cannot use open3()/waitpid() in a threaded application. If you
google 'perl fork threads', you'll find lots more info.
On Mon, Mar 4, 2013 at 9:25 AM, Sander Smeenk wrote:
> Hi,
>
> I'm new on this list, not sure
Quoting Jerry D. Hedden (je...@hedden.us):
> For the most part, threads and forks are not compatible. Therefore, you
> probably cannot use open3()/waitpid() in a threaded application. If you
> google 'perl fork threads', you'll find lots more info.
I kind of expected this reply. :>
I did read
Quoting Sander Smeenk (ssme...@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 b
Sander,
Would it be possible to use the "forks" module? It is supposed to provide a
drop-in replacement for "threads" on operating systems that support posix
forks, which would be true in your case. I suspect this would cure your
problems, since everything would operate using forks instead of mixi
Quoting David Mertens (dcmertens.p...@gmail.com):
> Would it be possible to use the "forks" module? It is supposed to provide a
> drop-in replacement for "threads" on operating systems that support posix
> forks, which would be true in your case. I suspect this would cure your
> problems, since ev
On Mon, Mar 4, 2013 at 10:31 AM, Sander Smeenk 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
On Mon, Mar 04, 2013 at 04:32:13PM +0100, Sander Smeenk wrote:
> 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).
fork() on linux creates a single thread in the child process, but copies
the memory and state of *
Quoting Mike Pomraning (m...@pilcrow.madison.wi.us):
> > 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 ar
Quoting Dave Mitchell (da...@iabyn.com):
> > 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).
> fork() on linux creates a single thread in the child process, but copies
> the memory and state of *all* threads.
take a look at what I did in MrTools http://sourceforge.net/projects/mrtools/
specifically mrsync.pl
http://mrtools.svn.sourceforge.net/viewvc/mrtools/mrtools/trunk/mrsync.pl?revision=32&view=markup
Its not perfect but it works fairly well I stopped looking at return
codes and just looked at the st
No, no, I mean the module called "forks" from cpan:
https://metacpan.org/module/forks#same-API-as-threads
Drop-in replacement for threads, including shared data handling. I but that
would solve your problem satisfactorily.
David
On Mon, Mar 4, 2013 at 10:31 AM, Sander Smeenk wrote:
> Quoting
Hi,
I'm new on this list, not sure if this is the right place for this,
please redirect me if this is not on topic here. ;)
I am seeing issues with open3()/waitpid() calls when running the same
code as multiple threads - this does not happen with a single thread
running the code - i'm not sure wh
13 matches
Mail list logo