MCPcopy
hub / github.com/pyload/pyload / Popen

Class Popen

module/plugins/internal/misc.py:1155–1186  ·  view source on GitHub ↗

This supersedes Popen and corrects a bug in cPython implementation

Source from the content-addressed store, hash-verified

1153
1154
1155 class Popen(subprocess.Popen):
1156 """
1157 This supersedes Popen and corrects a bug in cPython implementation
1158 """
1159 def _execute_child(self, args, executable, preexec_fn, close_fds,
1160 cwd, env, universal_newlines,
1161 startupinfo, creationflags, shell, to_close,
1162 p2cread, p2cwrite,
1163 c2pread, c2pwrite,
1164 errread, errwrite):
1165
1166 if not isinstance(args, subprocess.types.StringTypes):
1167 args = subprocess.list2cmdline(args)
1168
1169 if startupinfo is None:
1170 startupinfo = subprocess.STARTUPINFO()
1171 if shell:
1172 startupinfo.dwFlags |= _subprocess.STARTF_USESHOWWINDOW
1173 startupinfo.wShowWindow = _subprocess.SW_HIDE
1174 comspec = os.environ.get("COMSPEC", u"cmd.exe")
1175 args = u'%s /c "%s"' % (comspec, args)
1176 if _subprocess.GetVersion() >= 0x80000000 or os.path.basename(comspec).lower() == "command.com":
1177 w9xpopen = self._find_w9xpopen()
1178 args = u'"%s" %s' % (w9xpopen, args)
1179 creationflags |= _subprocess.CREATE_NEW_CONSOLE
1180
1181 super(Popen, self)._execute_child(args, executable, preexec_fn, close_fds,
1182 cwd, env, universal_newlines,
1183 startupinfo, creationflags, False, to_close,
1184 p2cread, p2cwrite,
1185 c2pread, c2pwrite,
1186 errread, errwrite)
1187
1188 _subprocess.CreateProcess = CreateProcess

Callers 13

thriftFunction · 0.85
compile_jsFunction · 0.85
tryReconnectMethod · 0.85
reniceFunction · 0.85
findMethod · 0.85
call_cmdMethod · 0.85
findMethod · 0.85
call_cmdMethod · 0.85
call_cmdMethod · 0.85
findMethod · 0.85
runMethod · 0.85
scanMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected