Date: Tue, 3 Jun 1997 00:11:48 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: hackers@FreeBSD.ORG Cc: bmcgover@cisco.com (Brian McGovern) Subject: Re: Need help with pppd... Message-ID: <19970603001148.DM01471@uriah.heep.sax.de> In-Reply-To: <199706022119.RAA00332@bmcgover-pc.cisco.com>; from Brian McGovern on Jun 2, 1997 17:19:11 -0400 References: <199706022119.RAA00332@bmcgover-pc.cisco.com>
index | next in thread | previous in thread | raw e-mail
As Brian McGovern wrote:
> I guess the question I really have is this... With the other serial drivers,
> what keeps pppd from spinning completely out of control (if its not selecting/
> blocking on the async port)?
It _is_ selecting on the port.
/*
* wait_input - wait until there is data available on fd,
* for the length of time specified by *timo (indefinite
* if timo is NULL).
*/
wait_input(timo)
struct timeval *timo;
{
fd_set ready;
int n;
FD_ZERO(&ready);
FD_SET(fd, &ready);
n = select(fd+1, &ready, NULL, &ready, timo);
if (n < 0 && errno != EINTR) {
syslog(LOG_ERR, "select: %m");
die(1);
}
}
--
cheers, J"org
joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970603001148.DM01471>
