why use /bin/sh -c in popen2(3/4)?

Cameron Laird claird at starbase.neosoft.com
Wed Apr 18 15:49:04 EDT 2001


In article <mailman.987576205.9677.python-list at python.org>,
javalist  <javalist at 21cn.com> wrote:
>Hello python-list,
>
>        reading popen2.py I am curiously that why Popen3._run_child() add
>addition two command "bin/sh" and "-c" to execute the input argument?why not
>just execute the input cmd(say oldcmd) directly using os.execvp(oldcmd[0],
>oldcmd)?following is the origin code:
			.
			.
			.
To get the metacharacter behavior many Unix people
expect--filename expansion, in particular.
-- 

Cameron Laird <claird at NeoSoft.com>
Business:  http://www.Phaseit.net
Personal:  http://starbase.neosoft.com/~claird/home.html



More information about the Python-list mailing list