MCPcopy Create free account
hub / github.com/nodejs/node / _start_process

Method _start_process

deps/v8/tools/testrunner/local/command.py:320–342  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

318
319class WindowsCommand(DesktopCommand):
320 def _start_process(self, **kwargs):
321 # Try to change the error mode to avoid dialogs on fatal errors. Don't
322 # touch any existing error mode flags by merging the existing error mode.
323 # See http://blogs.msdn.com/oldnewthing/archive/2004/07/27/198410.aspx.
324 def set_error_mode(mode):
325 prev_error_mode = SEM_INVALID_VALUE
326 try:
327 import ctypes
328 prev_error_mode = (
329 ctypes.windll.kernel32.SetErrorMode(mode)) #@UndefinedVariable
330 except ImportError:
331 pass
332 return prev_error_mode
333
334 error_mode = SEM_NOGPFAULTERRORBOX
335 prev_error_mode = set_error_mode(error_mode)
336 set_error_mode(error_mode | prev_error_mode)
337
338 try:
339 return super(WindowsCommand, self)._start_process(**kwargs)
340 finally:
341 if prev_error_mode != SEM_INVALID_VALUE:
342 set_error_mode(prev_error_mode)
343
344 def _get_popen_args(self):
345 return subprocess.list2cmdline(self._to_args_list())

Callers

nothing calls this directly

Calls 1

_start_processMethod · 0.45

Tested by

no test coverage detected