in reply to Re: System call within cgi script
in thread System call within cgi script

I suspect Joost is right. I just tested the portion of the OP's code calling notepad (with WampServer), and I now have a phantom notepad process that I can see from the task manager even though the notepad GUI never appears. Since system does a fork and waits for the command to complete, the perl script is waiting for notepad to exit and return a value. since noone ever closes notepad, it never completes, hence the permenant hang.

You could just fork and exec, but not only is that a sloppy solution, I assume you want the notepad window to actually display to the active user, right? Apache doesnt seem to want to allow that, and I have no idea how to get around it.

__________
The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.
- Terry Pratchett

Replies are listed 'Best First'.
Re^3: System call within cgi script
by diotalevi (Canon) on Jan 29, 2007 at 20:21 UTC

    No, in this case fork/exec is complicating the matter. You'd want to go to basics with Win32::Process and use CreateProcess.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊