Click to See Complete Forum and Search --> : Equivalent of Perl's fork() function


o0zi
08-09-2003, 01:11 PM
I'm writing a bi-directional chat program in Perl, which requires the use of fork() so I can send data and listen for incoming data at the same time. However, fork() doesn't work on Windows XP, so is there something else I can use to achieve the same result?

bwkaz
08-09-2003, 03:34 PM
Abandon XP?

Nothing in the Windows API that I know of is close to fork(). There's CreateProcess(), but that requires a path to an executable to start up in the new process, so you can't just "continue from this point on".

Does Perl have support for threads rather than using fork()?

o0zi
08-10-2003, 01:32 AM
Perl has support for threads but only if you compile it in (which is too difficult on Windows XP) and it probably only works on Linux anyway :(

Of course, my chat program works perfectly on Linux!