1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

Explicitly unlock tty_fd when exiting with noreset

This commit is contained in:
Nick Patavalis
2018-01-20 14:36:11 +02:00
parent dabb708a8c
commit 7bf7b5d491

View File

@ -674,6 +674,11 @@ cleanup (int drain, int noreset, int hup)
if ( noreset ) {
pinfo("Skipping tty reset...\r\n");
term_erase(tty_fd);
#ifdef USE_FLOCK
/* Explicitly unlock tty_fd before exiting. See
comments in term.c/term_exitfunc() for more. */
flock(tty_fd, LOCK_UN);
#endif
}
}