ports/security/pssh/files/patch-psshlib_manager.py
Brooks Davis 40fd38b3e2 Fix bitrotted code.
Drop maintainership.  I don't use this port much as evidenced by the
fact that one of these bugs was fixed in Arch Linux in 2016
(https://bugs.archlinux.org/task/46571).

Submitted by:	Jacob D Hunt
MFH:		2020Q2
2020-04-10 16:55:09 +00:00

18 lines
554 B
Python

--- psshlib/manager.py.orig
+++ psshlib/manager.py
@@ -2,6 +2,7 @@
from errno import EINTR
import os
+import fcntl
import select
import signal
import sys
@@ -209,6 +210,7 @@
# Setup the wakeup file descriptor to avoid hanging on lost signals.
wakeup_readfd, wakeup_writefd = os.pipe()
+ fcntl.fcntl(wakeup_writefd, fcntl.F_SETFL, os.O_NONBLOCK)
self.register_read(wakeup_readfd, self.wakeup_handler)
# TODO: remove test when we stop supporting Python <2.5
if hasattr(signal, 'set_wakeup_fd'):