summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2016-11-02 16:24:57 +0100
committerSven Eden <yamakuzure@gmx.net>2017-07-17 17:58:34 +0200
commitabfb131a9c2906ad7c6c5ef27a956f5047fb6548 (patch)
tree4693a0cf6f4227da2e5025e96a89c9ec5fd47480
parent5091db1fa99acdbc3d9acb485c1c70d8bfb636db (diff)
core: monitor the inotify file descriptor not the console one in acquire_terminal()
When waiting for the terminal to be release in acquire_terminal(), we were monitoring the terminal fd instead of the inotify descriptor. Therefore any write accesses would wake up the waiting process instead of being wake up when the tty is closed only.
-rw-r--r--src/basic/terminal-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c
index d29dcd5be..98600f7a4 100644
--- a/src/basic/terminal-util.c
+++ b/src/basic/terminal-util.c
@@ -457,7 +457,7 @@ int acquire_terminal(
goto fail;
}
- r = fd_wait_for_event(fd, POLLIN, ts + timeout - n);
+ r = fd_wait_for_event(notify, POLLIN, ts + timeout - n);
if (r < 0)
goto fail;