diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1995-09-19 09:07:51 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1995-09-19 09:07:51 +0000 |
commit | 7fcd7f5dcb931fcd962b83d76c2e50964707937c (patch) | |
tree | 1a7d2823b3520ababc17a73cdd26e33255730421 /sbin/slattach | |
parent | bf5c926da35b3b7ee5b2931130973d2f91425e64 (diff) | |
download | src-7fcd7f5dcb931fcd962b83d76c2e50964707937c.tar.gz src-7fcd7f5dcb931fcd962b83d76c2e50964707937c.zip |
Unlock device for redial_cmd, then lock again
Notes
Notes:
svn path=/head/; revision=10897
Diffstat (limited to 'sbin/slattach')
-rw-r--r-- | sbin/slattach/slattach.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sbin/slattach/slattach.c b/sbin/slattach/slattach.c index ee4c98dffe19..4a01e5a2d6c7 100644 --- a/sbin/slattach/slattach.c +++ b/sbin/slattach/slattach.c @@ -440,8 +440,16 @@ again: 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; |