Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: IPC::Run and Win32::Process::Create

by jpavel (Sexton)
on Jul 09, 2004 at 17:44 UTC ( [id://373202]=note: print w/replies, xml ) Need Help??


in reply to IPC::Run and Win32::Process::Create

Update: seems like this workaround is pretty solid...
my $file = Win32::GetShortPathName($scpfile->Text()); $file =~ /(.*\\).*$/; print "CD to $1\n"; Win32::SetCwd($1);
Not the prettiest bit of code, but I wanted to see if the cwd could be to blame. I still don't get why I have this problem in the first place; I pass the absolute path to the file (works from a direct command line incantation of pscp). This workaround means I have to send the absolute path to pscp now, but no biggie there. If anyone can explain what I ran into with this, please let me know!!

Replies are listed 'Best First'.
Re^2: IPC::Run and Win32::Process::Create
by BrowserUk (Patriarch) on Jul 09, 2004 at 18:23 UTC

    I suspect that the error text caught Bad file descriptor: Win32::Process::Create()... is unrelated to the problem you were having. Your probably still getting that msg even with your work-around. It is probably benign.

    It would be interesting to substitute a .bat file for the PSPC command and see what the actual parameters that are being received by the called program are (prior to your fix), along with the cwd at that point.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://373202]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-29 12:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found