diff options
Diffstat (limited to 'usr.bin/tip')
-rw-r--r-- | usr.bin/tip/tip/cmds.c | 1 | ||||
-rw-r--r-- | usr.bin/tip/tip/tip.c | 9 | ||||
-rw-r--r-- | usr.bin/tip/tip/tip.h | 1 | ||||
-rw-r--r-- | usr.bin/tip/tip/uucplock.c | 1 |
4 files changed, 12 insertions, 0 deletions
diff --git a/usr.bin/tip/tip/cmds.c b/usr.bin/tip/tip/cmds.c index f6badcb..50cedc4 100644 --- a/usr.bin/tip/tip/cmds.c +++ b/usr.bin/tip/tip/cmds.c @@ -666,6 +666,7 @@ tipabort(char *msg) daemon_uid(); (void)uu_unlock(uucplock); unraw(); + unexcl(); exit(0); } diff --git a/usr.bin/tip/tip/tip.c b/usr.bin/tip/tip/tip.c index 22b362c..058a99b 100644 --- a/usr.bin/tip/tip/tip.c +++ b/usr.bin/tip/tip/tip.c @@ -325,6 +325,15 @@ unraw(void) tcsetattr(0, TCSADRAIN, &defterm); } +/* + * give up exclusive tty access + */ +void +unexcl() +{ + ioctl(FD, TIOCNXCL, 0); +} + static jmp_buf promptbuf; /* diff --git a/usr.bin/tip/tip/tip.h b/usr.bin/tip/tip/tip.h index 5e9a37e..cd679ed 100644 --- a/usr.bin/tip/tip/tip.h +++ b/usr.bin/tip/tip/tip.h @@ -341,6 +341,7 @@ void timeout(int); void tipabort(char *); void tipout(void); void user_uid(void); +void unexcl(void); void unraw(void); void v3451_abort(void); void v3451_disconnect(void); diff --git a/usr.bin/tip/tip/uucplock.c b/usr.bin/tip/tip/uucplock.c index 81e463e..c82ea78 100644 --- a/usr.bin/tip/tip/uucplock.c +++ b/usr.bin/tip/tip/uucplock.c @@ -126,5 +126,6 @@ uu_unlock(char *ttyname) char tbuf[sizeof(_PATH_LOCKDIRNAME) + MAXNAMLEN]; (void)snprintf(tbuf, sizeof tbuf, _PATH_LOCKDIRNAME, ttyname); + unexcl(); return(unlink(tbuf)); } |