1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Prevent modem hanging forever on close with CTS off:

use 1min timeout to wakeup ttywait
This commit is contained in:
Andrey A. Chernov 1994-10-15 18:05:25 +00:00
parent 61181d7df2
commit 22171b7a33
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3620
3 changed files with 9 additions and 3 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.53 1994/09/21 19:39:25 davidg Exp $
* $Id: sio.c,v 1.54 1994/10/12 19:49:11 bde Exp $
*/
#include "sio.h"
@ -876,7 +876,9 @@ sioclose(dev, flag, mode, p)
com = com_addr(MINOR_TO_UNIT(mynor));
tp = com->tp;
s = spltty();
timeout((timeout_func_t)wakeup, (caddr_t)&tp->t_outq, 60*hz);
(*linesw[tp->t_line].l_close)(tp, flag);
untimeout((timeout_func_t)wakeup, (caddr_t)&tp->t_outq);
siostop(tp, FREAD | FWRITE);
comhardclose(com);
ttyclose(tp);

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.53 1994/09/21 19:39:25 davidg Exp $
* $Id: sio.c,v 1.54 1994/10/12 19:49:11 bde Exp $
*/
#include "sio.h"
@ -876,7 +876,9 @@ sioclose(dev, flag, mode, p)
com = com_addr(MINOR_TO_UNIT(mynor));
tp = com->tp;
s = spltty();
timeout((timeout_func_t)wakeup, (caddr_t)&tp->t_outq, 60*hz);
(*linesw[tp->t_line].l_close)(tp, flag);
untimeout((timeout_func_t)wakeup, (caddr_t)&tp->t_outq);
siostop(tp, FREAD | FWRITE);
comhardclose(com);
ttyclose(tp);

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* $Id: sio.c,v 1.53 1994/09/21 19:39:25 davidg Exp $
* $Id: sio.c,v 1.54 1994/10/12 19:49:11 bde Exp $
*/
#include "sio.h"
@ -876,7 +876,9 @@ sioclose(dev, flag, mode, p)
com = com_addr(MINOR_TO_UNIT(mynor));
tp = com->tp;
s = spltty();
timeout((timeout_func_t)wakeup, (caddr_t)&tp->t_outq, 60*hz);
(*linesw[tp->t_line].l_close)(tp, flag);
untimeout((timeout_func_t)wakeup, (caddr_t)&tp->t_outq);
siostop(tp, FREAD | FWRITE);
comhardclose(com);
ttyclose(tp);