develooper Front page | perl.perl5.porters | Postings from September 2012

[perl #24731] Fork/ Thread in windows 2003 server 64 Bit

Thread Next
From:
James E Keenan via RT
Date:
September 29, 2012 18:45
Subject:
[perl #24731] Fork/ Thread in windows 2003 server 64 Bit
Message ID:
rt-3.6.HEAD-11172-1348969521-1139.24731-15-0@perl.org
On Sun Dec 21 23:30:47 2003, beissinger.tobias@siemens.com wrote:
> Hello,
> 
> I think there is a bug in fork in windows server 2003 64-Bit on an
>    IA64 Platform (Itanium 2).
> I tried these perls: ActiveState 5.8, Stable 5.8, Developer 5.9
> 
> The code affected is:
> 
> if ($pid=fork()) {
>    #mainprog
> }
> else {
>    exec "perl $0"; #start my prog again and "close" the child
>    immediatly
> }
> 
> I use this code to generate multiple sessions on a database (it's part
>    of my diploma thesis).
> 
> PROBLEM:
> The exec also kills the #mainprog section.
> 
> The code works fine and as expected under Suse Linux 8.0, 8.1, 8.2,
>    HP-UX 11.20, 11.22, 11.23, Windows XP Professional SP1.
> I would prefer exec rather than system because I want totally
>    independent instances of my testscript (Many different users do
>    many different actions). For me that's the only way to do it ( or
>    you tell me how to fork up to 500 instances).
> 
> I also tried to encapsulate the exec in a "sub restart" and to start
>    this as a thread (use thread, thread->new...), but it has the same
>    effect, even if I additionally fork in that sub:
> 
> Sub restart {
>   if ($pid=fork()) {
>     return; } #ok, that's unorthodox, but it worked
>   else {exec $0; }
> }
> $t=Thread->new(\&restart)
> 
> Mit freundlichen Gr��en/ Kind regards
> 
> Tobias Beissinger
> Siemens VDO Automotive AG
> SV IO ML
> RbgS/O10/2/A15.1
> Tel.: 0941/ 790 - 9823
> 

Do we have any Windows 64-bit folk who could look at this older ticket?
 One of the original respondents is no longer with us.

Thank you very much.
Jim Keenan



---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=24731

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