closerange() in child works on OS X also
This commit is contained in:
parent
3b2e28fd83
commit
4b28cc755e
@ -9,7 +9,7 @@ import fcntl
|
||||
import signal
|
||||
from threading import Thread
|
||||
|
||||
from .constants import terminfo_dir, isosx
|
||||
from .constants import terminfo_dir
|
||||
|
||||
|
||||
def remove_cloexec(fd):
|
||||
@ -52,7 +52,6 @@ class Child:
|
||||
else:
|
||||
os.dup2(slave, i)
|
||||
os.close(slave), os.close(master)
|
||||
if not isosx: # Apparently some OS X systemlibraries open file descriptors that cause EXC_GUARD crashes when closed
|
||||
os.closerange(3, 200)
|
||||
# Establish the controlling terminal (see man 7 credentials)
|
||||
os.close(os.open(os.ttyname(1), os.O_RDWR))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user