Re: new host server for w.v.o

* Ville Skyttä wrote:
>Hm, possibly a stupid question, but do you know why is any "cmd.exe"
>needed in the first place?  I thought that when doing a system(),
>exec(), open3() and friends with the arguments properly split and passed
>in as a list would avoid the need for a shell/command interpreter.  Or
>is this different in Windows?

One reason for that is that Perl uses CreateProcess(...) to spawn new
processes which has a behavior different from the CRT _spawn*(...)
routines (and the cmd.exe shell), for example, CreateProcess(...)
assumes a .exe file name extension if the application name lacks an
extension, while _spawn*(...) would first search for .com, ... AFAIR
CreateProcess(...) also expects only executable files, hence you could
not use it to execute a .cmd file without explicitly using cmd.exe with
proper arguments. perl/win32/win32.c:win32_spawnvp(...) probably
contains comments to this effect, long since I last looked at it.

>If the ":80 version" already has the IPC::Run stuff in place, could you
>try with that instead of IPC::Open3, and see if it works better?  It'll
>need commenting out a mod_perl check near the first occurrence of
>$HAVE_IPC_RUN, and of course installing it :)

No, v1.305.2.12 lacks such code, but for v1.305.2.84 IPC::Run seems to
do better than IPC::Open3 on the command line, but when invoked via CGI
it hangs (ongmls.exe remains in the process list). It is impossible to
kill the onsgmls.exe instances through the task manager, I had to `kill
-f` them...

Received on Wednesday, 7 April 2004 13:45:02 UTC