Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2015-07-07 01:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (86 votes), past polls