mirror of
https://github.com/nodejs/node.git
synced 2024-11-22 11:12:18 +00:00
bd496e0187
Check that stdin, stdout and stderr are valid file descriptors on Windows. If not, reopen them with 'nul' file. Refs: https://github.com/nodejs/node/pull/875 Fixes: https://github.com/nodejs/node/issues/11656 PR-URL: https://github.com/nodejs/node/pull/11863 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
9 lines
150 B
Python
9 lines
150 B
Python
import os
|
|
import sys
|
|
import subprocess
|
|
os.close(0)
|
|
os.close(1)
|
|
os.close(2)
|
|
exit_code = subprocess.call(sys.argv[1:], shell=False)
|
|
sys.exit(exit_code)
|