Skip to content

Commit

Permalink
Make sure SIGPIPE has default handler set
Browse files Browse the repository at this point in the history
  • Loading branch information
dlukes committed Mar 12, 2021
1 parent df510ce commit e1b40f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion terminado/management.py
Expand Up @@ -43,7 +43,8 @@ def __init__(self, argv, env=[], cwd=None):
# We keep the same read_buffer as before
self.read_buffer = deque([], maxlen=10)
self.preopen_buffer = deque([])
self.ptyproc = PtyProcessUnicode.spawn(argv, env=env, cwd=cwd)
self.ptyproc = PtyProcessUnicode.spawn(argv, env=env, cwd=cwd,
preexec_fn=lambda: signal.signal(signal.SIGPIPE, signal.SIG_DFL))

def resize_to_smallest(self):
"""Set the terminal size to that of the smallest client dimensions.
Expand Down

0 comments on commit e1b40f6

Please sign in to comment.