Reopen descriptor 0 as /dev/tty when in interactive mode

in OpenBSD as well as FreeBSD (I still don't know why).
Add a debug diagnostic when creating a child process as
a link.
This commit is contained in:
Brian Somers 1999-03-07 01:02:39 +00:00
parent 94446a2ed6
commit a611383fee
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=44539
2 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: main.c,v 1.149 1999/02/02 09:35:29 brian Exp $
* $Id: main.c,v 1.150 1999/02/06 02:54:46 brian Exp $
*
* TODO:
*/
@ -276,11 +276,10 @@ main(int argc, char **argv)
#endif
label = ProcessArgs(argc, argv, &mode, &alias);
#ifdef __FreeBSD__
/*
* A FreeBSD hack to dodge a bug in the tty driver that drops output
* occasionally.... I must find the real reason some time. To display
* the dodgy behaviour, comment out this bit, make yourself a large
* A FreeBSD & OpenBSD hack to dodge a bug in the tty driver that drops
* output occasionally.... I must find the real reason some time. To
* display the dodgy behaviour, comment out this bit, make yourself a large
* routing table and then run ppp in interactive mode. The `show route'
* command will drop chunks of data !!!
*/
@ -291,7 +290,6 @@ main(int argc, char **argv)
return 2;
}
}
#endif
/* Allow output for the moment (except in direct mode) */
if (mode == PHYS_DIRECT)

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: modem.c,v 1.103 1999/02/25 20:05:55 brian Exp $
* $Id: modem.c,v 1.104 1999/02/26 21:28:12 brian Exp $
*
* TODO:
*/
@ -591,6 +591,8 @@ modem_Open(struct physical *modem, struct bundle *bundle)
close(fids[1]);
modem->fd = fids[0];
waitpid(pid, &stat, 0);
log_Printf(LogDEBUG, "Using descriptor %d for child\n",
modem->fd);
break;
}
}