ttynvt: Move optional delay during close
Move to after closing the fds. As suggested in https://gitlab.com/lars-thrane-as/ttynvt/-/issues/11.
This commit is contained in:
+3
-3
@@ -1118,13 +1118,13 @@ static void ttynvt_release(fuse_req_t req, struct fuse_file_info *info)
|
|||||||
pthread_mutex_destroy(&tty->tty_lock);
|
pthread_mutex_destroy(&tty->tty_lock);
|
||||||
pthread_mutex_destroy(&tty->poll_lock);
|
pthread_mutex_destroy(&tty->poll_lock);
|
||||||
|
|
||||||
if (ttynvt_param.close_delay_us)
|
|
||||||
_ttynvt_sleep_us(ttynvt_param.close_delay_us);
|
|
||||||
|
|
||||||
_fd_close(tty->fds[FD_NET].fd);
|
_fd_close(tty->fds[FD_NET].fd);
|
||||||
_fd_close(tty->fds[FD_MASTER].fd);
|
_fd_close(tty->fds[FD_MASTER].fd);
|
||||||
_fd_close(tty->fds[FD_SLAVE].fd);
|
_fd_close(tty->fds[FD_SLAVE].fd);
|
||||||
|
|
||||||
|
if (ttynvt_param.close_delay_us)
|
||||||
|
_ttynvt_sleep_us(ttynvt_param.close_delay_us);
|
||||||
|
|
||||||
if (tty->ph)
|
if (tty->ph)
|
||||||
fuse_pollhandle_destroy(tty->ph);
|
fuse_pollhandle_destroy(tty->ph);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user