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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user