Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

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

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 rifling through the Monastery: (5)
As of 2016-10-26 01:30 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (330 votes). Check out past polls.