Just another Perl shrine | |
PerlMonks |
Re^7: exec() on Windowsby BrowserUk (Patriarch) |
on May 26, 2010 at 14:38 UTC ( [id://841737]=note: print w/replies, xml ) | Need Help?? |
Windows OS doesn't support exec in the POSIX form, just as it doesn't support fork. So these are both emulated by Perl on Windows--but not very accurately. In particular, exec will work pretty much exactly like system. Ie. It will start a new process and wait for that process to end. If however, you use system( 1, ... ) it will start the new process asynchronously (it won't wait) and if the perl script ends, the new process will continue as if the script had never existed. And yes. I use Windows. Now, how about you answer the question I asked? You've already agreed that if you replace exec with system( 1, 'yourname.html' );, and you run your script from the command line, it operates as you want it to. But, you said "it doesn't work" if you double-click it, or a short-cut to it, and my question to you was: WHAT ACTUALLY HAPPENS WHEN YOU DOUBLE CLICK IT, OR A SHORT CUT TO IT? Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|