Close tty_fd after dup2
This commit is contained in:
parent
b06cbc9465
commit
20cffc728e
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user