in reply to Re: exec on Windows "halfway forks"
in thread exec on Windows "halfway forks"

As you observe correctly, exec does not return. The while loop is only reached if the if condition inside the INIT is false, i.e. (typically) on the recursive call, when the program is called using an absolute path name.

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^3: exec on Windows "halfway forks"
by BrowserUk (Patriarch) on Jun 15, 2010 at 11:38 UTC

    You seem to be leaping through extraordinary hoops in order to achieve what happens naturally on my system:

    C:\test>p1 [0] Perl> print $0;; C:\Perl64\bin\p1.pl [0] Perl> print $^X;; C:\perl64\bin\perl.exe ^C C:\test>cd \Perl64\bin C:\Perl64\bin>.\p1.pl [0] Perl> print $0;; C:\Perl64\bin\p1.pl [0] Perl> print $^X;; C:\perl64\bin\perl.exe

    And under both the above circumstances, ProcessExplorer shows the fully qualified path of both the perl executable and the script being run.

    Do you know of circumstances where that is not the case?