[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: io.popen of unknown program succeeds
- From: Rob Kendrick <rjek@...>
- Date: Fri, 27 Dec 2013 21:58:50 +0000
On Fri, Dec 27, 2013 at 04:42:55PM -0500, Sean Conner wrote:
> > Am I missing something?
>
> It's Linux.
s/Linux/UNIX/
popen() passes the string you give it to the shell (most likely as set
in $SHELL in the environment); it has no way of knowing if the arbitrary
line of shellscript you gave it was successful in running a program or
not.
If you want reliability, you need a proper subprocess module that uses
fork/exec and executes the program directly.
B.