- Timestamp:
- Dec 11, 2015, 1:26:45 AM (10 years ago)
- Location:
- python/trunk/Lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk/Lib/popen2.py
r10 r603 12 12 warnings.warn("The popen2 module is deprecated. Use the subprocess module.", 13 13 DeprecationWarning, stacklevel=2) 14 15 import sysconfig 16 SHELL = sysconfig.get_config_var('SHELL') or '/bin/sh' 14 17 15 18 __all__ = ["popen2", "popen3", "popen4"] … … 82 85 def _run_child(self, cmd): 83 86 if isinstance(cmd, basestring): 84 cmd = [ '/bin/sh', '-c', cmd]87 cmd = [SHELL, '-c', cmd] 85 88 os.closerange(3, MAXFD) 86 89 try: -
python/trunk/Lib/subprocess.py
r391 r603 396 396 import signal 397 397 import errno 398 399 import sysconfig 400 SHELL = sysconfig.get_config_var('SHELL') or '/bin/sh' 398 401 399 402 # Exception classes used by this module. … … 1198 1201 1199 1202 if shell: 1200 args = [ "/bin/sh", "-c"] + args1203 args = [SHELL, "-c"] + args 1201 1204 if executable: 1202 1205 args[0] = executable
Note:
See TracChangeset
for help on using the changeset viewer.