mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-25 00:38:58 +00:00
Make sure stdout is blocking for "darc serve".
Fixes ssh issue on CentOS
This commit is contained in:
parent
c4e022a7fc
commit
d7e876557a
1 changed files with 3 additions and 0 deletions
|
@ -38,6 +38,9 @@ def serve(self):
|
|||
# Make stdin non-blocking
|
||||
fl = fcntl.fcntl(sys.stdin.fileno(), fcntl.F_GETFL)
|
||||
fcntl.fcntl(sys.stdin.fileno(), fcntl.F_SETFL, fl | os.O_NONBLOCK)
|
||||
# Make stdout blocking
|
||||
fl = fcntl.fcntl(sys.stdout.fileno(), fcntl.F_GETFL)
|
||||
fcntl.fcntl(sys.stdout.fileno(), fcntl.F_SETFL, fl & ~os.O_NONBLOCK)
|
||||
unpacker = msgpack.Unpacker()
|
||||
while True:
|
||||
r, w, es = select.select([sys.stdin], [], [], 10)
|
||||
|
|
Loading…
Reference in a new issue