http://www.perlmonks.org?node_id=930623


in reply to Re: Why does Test-WWW-Mechanize-Catalyst-0.55\t\multi_content_type.t hang on win32?
in thread Why does Test-WWW-Mechanize-Catalyst-0.55\t\multi_content_type.t hang on win32?

Um, no, its hanging, if fork failed, program would end

$ perl -Mblib t/multi_content_type.t 1..8 # # ################################################################### # Starting an external Catalyst HTTP server on port 7357 # To change the port, please set the TWMC_TEST_PORT env variable. # (The server will be automatically shut-down right after the tests). # ################################################################### ok 1 - use ExternalCatty;
  • Comment on Re^2: Why does Test-WWW-Mechanize-Catalyst-0.55\t\multi_content_type.t hang on win32?
  • Download Code

Replies are listed 'Best First'.
Re^3: Why does Test-WWW-Mechanize-Catalyst-0.55\t\multi_content_type.t hang on win32?
by Corion (Patriarch) on Oct 10, 2011 at 15:26 UTC

    Without looking further into this - my experience with fork() and sockets on Windows has led me to always spawn external processes (that is, HTTP servers) for module self-testing instead. Launching an external process via pipe-open works for HTTP::Server::Simple, WWW::Mechanize, WWW::Mechanize::Firefox and WWW::Mechanize::Shell.

    I would not bother with investigating why fork and sockets don't interact like on Unix, because the fork-emulation never handled that well anyway.

      Thanks