strange _spawnl() and system() behavior with VC++ Pro 5.0

Chad Campbell chad at innovision.com
Tue Sep 22 19:33:19 GMT 1998


I'm having a problem using _spawnl and system to run processes on a
network drive.  If my program runs something like
system("unzip -l testfile.zip"), unzip actually looks for testfile.zip
in the root
of the drive rather than the current directory, although the current
directory
as returned by _getcwd() and GetCurrentDirectory() are correct.  I've
tried
getting the current directory and setting it with SetCurrentDirectory to
no
avail.  This occurs with WinNT commands like dir and type as well.  Dir
works correctly, but if it is piped to a file, the file is stored in the
root
directory.  Type has the same problem with opening files that unzip has.
This doesn't occur if I try it on a local drive. My network drive is
mounted to
a Solaris 2.6 box using Samba.  Can anyone let me know what might be
happening?

Thanks,

Chad

-- 
Chad Campbell
Software Engineer, Innovision Corporation
chad at innovision.com, (913)226-8700


More information about the samba mailing list