New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows exec() after fork() replaces all pseudo-processes #6999
Comments
From beissinger.tobias@siemens.comHello, I think there is a bug in fork in windows server 2003 64-Bit on an IA64 Platform (Itanium 2). The code affected is: if ($pid=fork()) { I use this code to generate multiple sessions on a database (it's part of my diploma thesis). PROBLEM: 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 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 { Mit freundlichen Grüßen/ Kind regards Tobias Beissinger |
From @iabynOn Mon, Dec 22, 2003 at 07:30:48AM -0000, Beissinger Tobias wrote:
I don't "do" Windows, so the following comments are speculative. Since Windows doesn't support fork() at the OS level, Perl has to Dave. -- |
From nick@ing-simmons.netDave Mitchell <davem@fdisolutions.com> writes:
My expertise is rusting rapidly, but AFAIK to fake fork you need threads. I don't see how it can work on XP. Note that cygwin pseudo-OS has its own fork() faking... |
From @jkeenanOn Sun Dec 21 23:30:47 2003, beissinger.tobias@siemens.com wrote:
Do we have any Windows 64-bit folk who could look at this older ticket? Thank you very much. |
From @dcollinsnfork() is extremely difficult and slow to implement on Windows. Cygwin managed to pull it off - through no small effort - and even so, their implementation is quite slow. Windows effectively requires you to implement fork() through CreateProcess() and then using IPC to copy state to the new process. For reasons (presumably efficiency), we emulate fork() on Windows using threads. In fact, perldoc perlfork even freely admits that "if the parent process is killed, all the pseudo-processes are killed as well". If we think this is worth a separate note, we can add another heading that fork-exec does not work on Windows, or add a note to for Portability Caveats section in that doc. However, this ticket asks "do not emulate fork() using threads", so it is wishlist at best. |
Migrated from rt.perl.org#24731 (status was 'open')
Searchable as RT24731$
The text was updated successfully, but these errors were encountered: