From 5fa57ede8b76ce816de3c19ea7e96005dc2c34bc Mon Sep 17 00:00:00 2001 From: Aleksander Kiryk Date: Tue, 15 Mar 2022 09:59:26 +0100 Subject: [PATCH] Add a comment on nonblocking stdin --- watch.py | 1 + 1 file changed, 1 insertion(+) diff --git a/watch.py b/watch.py index c08a8e1..c378749 100755 --- a/watch.py +++ b/watch.py @@ -151,6 +151,7 @@ def watch(session, fsdev): signal.signal(signal.SIGTERM, kill_handler) + # Make stdin nonblocking to continue working when no command is sent flags = fcntl.fcntl(sys.stdin, fcntl.F_GETFL) fcntl.fcntl(sys.stdin, fcntl.F_SETFL, flags | os.O_NONBLOCK)