mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 22:14:53 +02:00
Close tty_fd after dup2
This commit is contained in:
@@ -408,7 +408,8 @@ def get_password(opts: RCOptions) -> str:
|
||||
except OSError:
|
||||
pass
|
||||
else:
|
||||
os.dup2(tty_fd, sys.stdin.fileno())
|
||||
with open(tty_fd, closefd=True):
|
||||
os.dup2(tty_fd, sys.stdin.fileno())
|
||||
else:
|
||||
try:
|
||||
with open(resolve_custom_file(opts.password_file)) as f:
|
||||
|
||||
Reference in New Issue
Block a user