Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: System, exec different behaviour with spaces

by Anonymous Monk
on Jan 12, 2012 at 10:08 UTC ( [id://947511]=note: print w/replies, xml ) Need Help??


in reply to System, exec different behaviour with spaces

For the reason why see exec always invokes the shell? win32.

For a slightly broken solution see Re^3: system() implementation on Windows (again)

For the solution see Re: system() implementation on Windows (again), which isn't yet part of the abstraction shell-quote / String::ShellQuote

Replies are listed 'Best First'.
Re^2: System, exec different behaviour with spaces
by sacambs (Initiate) on Jan 12, 2012 at 10:43 UTC

    Thanks for the pointers - I'm somewhat clearer about where the problem comes from, even if the fix is somewhat convoluted (I need to support multiple platforms). What I still don't get is why the behaviour is OK when using system, but not exec. I'd have thought that in terms of their argument passing the two would have been equivalent.

      What I still don't get is why the behaviour is OK when using system, but not exec.

      Perhaps you didn't notice, but that is what I asked :)

      Though, at this point, i don't really care what the answer is :)

        I did go through that thread, but kind of got lost on the way. If I'm reading it right the answer was 'it's probably something odd ActiveState have done to their version of the codebase' (unless they've compiled with odd settings for wait timers - which I wouldn't rule out given the daft settings they use for randbits).

        I guess my immediate fix is to use system and put up with having the perl process hang around longer than it needs to.

        Thanks for the help.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-03-19 04:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found