$PATH differences using system calls

Joseph Schnurr jschnurr at accelrys.com
Thu Apr 4 12:44:18 CST 2002


I'm trying to kick off a system command from perl (i'm running the script 
from a cygwin shell) and the system call should therefore call a cygwin 
shell (which it does.). the problem i'm running into is the $PATH variables 
are different between the cygwin shell I run the perl command from and the 
shell spawned from the system command. here are the two paths:
from cygwin shell:
PATH=/usr/local/bin:/usr/bin:/bin:/cygdrive/c/Program Files/Microsoft 
Visual Studio/Common/Tools/WinNT:/cygdrive/c/Program Files/Microsoft Visual 
Studio/Common/MSDev98/Bin:/cygdrive/c/oracle/ora81/bin:/cygdrive/c/program 
files/oracle/jre/1.1.7/bin:/cygdrive/c/perl/bin/:/cygdrive/c/winnt/system32:/cygdrive/c/winnt:/cygdrive/c/winnt/system32/wbem:/cygdrive/c/progra~1/symantec/pcanyw~1/:/cygdrive/c/progra~1/ultrae~1:/cygdrive/c/progra~1/diskac~1/bin:/cygdrive/c/program 
files/gnu/wincvs 
1.2:/cygdrive/c/mks/mksnt:/cygdrive/c/mex/build_mex/sdk1.1.9/bin/windows_4_intel_32:/cygdrive/c/mex/build_mex/mex210_runtime/bin/windows_4_intel_32:/cygdrive/c/Program 
Files/Microsoft Visual Studio/Common/Tools/WinNT:/cygdrive/c/Program 
Files/Microsoft Visual Studio/Common/MSDev98/Bin:/cygdrive/c/Program 
Files/Microsoft Visual 
Studio/Common/Tools:/vc98/bin:/cygdrive/c/share/MExFoo/build_mex/mex210_runtime/bin/Windows_4_Intel_32:/cygdrive/c/share/MExFoo/build_mex/sdk1.1.9/3rdParty/ace_tao/bin/Windows_4_Intel_32:/cygdrive/c/share/MExFoo/build_mex/sdk1.1.9/bin/Windows_4_Intel_32 

from perl system call in cygwin shell:
PATH=/usr/local/bin:/usr/bin:/bin:/cygdrive/c/Program:/cygdrive/c/share/MExFoo/build_mex/sdk1.1.9/3rdParty/ace_tao/bin/Windows_4_Intel_32:/cygdrive/c/share/MExFoo/build_mex/sdk1.1.9/bin/Windows_4_Intel_32

any ideas? (btw i'm running a gmake command so I need the msdev paths there 
for dlls during the build!)
thanks
Joseph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/archives/san-diego-pm/attachments/20020404/534ab9d5/attachment.htm


More information about the San-Diego-pm mailing list