summaryrefslogtreecommitdiff
path: root/src/basic/terminal-util.c
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2016-11-02 16:24:57 +0100
committerFranck Bui <fbui@suse.com>2016-11-17 09:22:45 +0100
commitf80da6f3e9913cec4febcf35536b6b98cfa9d33a (patch)
tree169d03a74513215e3fe091dae3d2bbdf9ff7a54a /src/basic/terminal-util.c
parent51b9bb4f8e88d420ae557c3ecf1922dd9ac95fcc (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.
Diffstat (limited to 'src/basic/terminal-util.c')
-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 eafdea9eb3..4b04ccc246 100644
--- a/src/basic/terminal-util.c
+++ b/src/basic/terminal-util.c
@@ -455,7 +455,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;