Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: Non-shell-invoking system/exec and qx//

by ikegami (Pope)
on Jun 18, 2008 at 17:06 UTC ( #692747=note: print w/ replies, xml ) Need Help??

in reply to Re: Non-shell-invoking system/exec and qx//
in thread Non-shell-invoking system/exec and qx//

That's not true. No shell is involved in the second snippet. (Check the ppid of ps.)

$ perl -e'system "ps -opid,ppid,cmd 2>/dev/null"' PID PPID CMD 11096 7077 -bash 5166 11096 perl -esystem "ps -opid,ppid,cmd 2>/dev/null" 13220 5166 sh -c ps -opid,ppid,cmd 2>/dev/null 19387 13220 ps -opid,ppid,cmd $ perl -e'system "ps -opid,ppid,cmd"' PID PPID CMD 11096 7077 -bash 13513 11096 perl -esystem "ps -opid,ppid,cmd" 26826 13513 ps -opid,ppid,cmd

Comment on Re^2: Non-shell-invoking system/exec and qx//
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2015-11-28 06:13 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (738 votes), past polls