Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: System, exec different behaviour with spaces

by Anonymous Monk
on Jan 12, 2012 at 10:08 UTC ( #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


Comment on Re: System, exec different behaviour with spaces
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
Node Status?
node history
Node Type: note [id://947511]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-07-12 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (239 votes), past polls