1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-02 08:42:48 +00:00

Unlock device for redial_cmd, then lock again

This commit is contained in:
Andrey A. Chernov 1995-09-19 09:07:51 +00:00
parent bf5c926da3
commit 7fcd7f5dcb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10897

View File

@ -440,8 +440,16 @@ void sighup_handler()
setup_line(CLOCAL);
syslog(LOG_NOTICE,"SIGHUP on %s (sl%d); running %s",
dev,unit,redial_cmd);
uu_unlock(dvname); /* for redial */
locked = 0;
if (system(redial_cmd))
goto again;
if (uu_lock(dvname)) {
syslog(LOG_ERR, "can't relock %s after %s, aborting",
dev, redial_cmd);
exit_handler(1);
}
locked = 1;
/* Now check again for carrier (dial command is done): */
if (!(modem_control & CLOCAL)) {
tty.c_cflag &= ~CLOCAL;