develooper Front page | perl.perl5.porters | Postings from August 2009

[perl #66158] fork crashes on perl 5.10.0/Win32 (when using Variable::Magic)

Thread Previous
From:
kmx via RT
Date:
August 5, 2009 02:25
Subject:
[perl #66158] fork crashes on perl 5.10.0/Win32 (when using Variable::Magic)
Message ID:
rt-3.6.HEAD-2466-1249460846-202.66158-15-0@perl.org
> I would be extremely reluctant to put this in RC1, and if it's not in
> RC1, it's not going to be in 5.10.1.
Oh, it is a really, really bad news at least for Catalyst::Runtime users
on Win32 as Catalyst quite heavily uses namespace::clean (based on
Variable-Magic) and any fork - tat is not so rare - is gonna kill
perl.exe. I should probably report this earlier :(

> So if I understand it correctly, Variable::Magic has been made to work
> under threads by making use of the thread's ptr_table, which is kept
> around after a new thread is created. However, fork() under windows is
> emulated by using the same threading mechanism that threads.pm uses
> but it doesn't keep the ptr_table around (and never has).
> Variable::Magic can't distinguish between a thread clone and a fork
> clone, and assumes that the ptr_table is always around, and thus
> explodes.
It is more a question on Vincent (putting him into cc:) but I understand
it exactly as you have said.

> The thing that puzzles me is that is doesn't explode on 5.8.x.
Yes also a mystery for me, the patched line in win32/perlhost.h seems to
be the same in 5.8.x - that is why I am not sure whether this is the
right place for the patch.

--
kmx 

Thread Previous


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