deekoo has asked for the wisdom of the Perl Monks concerning the following question:

I'm (trying to) port a perl app originally developed on Linux to win32.

Using perl 5.8.2 under Cygwin on Win98, system() will wait for a few aeons and then whines that sync_with_child failed because WaitForMultipleObjects timed out if I use POSIX;. (This perl's compiled from the 5.8.2 tarball using cygwin's GCC, and isn't using vfork().)

Is there any way to get the POSIX module to coexist with system() under win98, or should I just give up and rewrite everything that depends on it?

Replies are listed 'Best First'.
Re: system() and use POSIX on cygwin
by exussum0 (Vicar) on Feb 08, 2004 at 13:53 UTC
    Could you use exec()/fork()/waitpid() instead of system()?

    Play that funky music white boy..
      That narrows down the problem slightly: it hangs at the fork().
Re: system() and use POSIX on cygwin
by ysth (Canon) on Feb 09, 2004 at 03:53 UTC
    Can you give a short example that reproduces the problem?
      either of
      use POSIX; system('whatever');
      or
      use POSIX; fork();
      will do it.
        perl -we'use POSIX; system "sleep 10000"'
        works for me; does it for you? What version of cygwin? Did you build perl yourself or is this the cygwin binary? If built yourself, what's perl -V:config_args or what other changes did you make?

        Can anyone else with cygwin on win98 try the above use posix/sleep?