mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-26 10:51:55 +00:00
Explicitly close all fds other than the three std ones before execing()
This commit is contained in:
parent
0f4db0e91e
commit
c0e078a3fa
1 changed files with 1 additions and 0 deletions
|
|
@ -62,6 +62,7 @@ def fork_child(argv, cwd, opts):
|
|||
for i in range(3):
|
||||
os.dup2(slave, i)
|
||||
os.close(slave), os.close(master)
|
||||
os.closerange(3, 200)
|
||||
# Establish the controlling terminal (see man 7 credentials)
|
||||
os.close(os.open(os.ttyname(1), os.O_RDWR))
|
||||
os.environ['TERM'] = opts.term
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue