Date: Fri, 8 Dec 1995 10:00:47 +0100 (MET) From: J Wunsch <j@uriah.heep.sax.de> To: am@f1.ru Cc: freebsd-bugs@freebsd.org Subject: Re: uucp 1.06.1 bug Message-ID: <199512080900.KAA22615@uriah.heep.sax.de> In-Reply-To: <199512072245.BAA26678@px.f1.ru> from "Andrew Maltsev" at Dec 8, 95 01:45:55 am
next in thread | previous in thread | raw e-mail | index | archive | help
As Andrew Maltsev wrote: > > The Ian Tailor's uucp 1.06.1 (and, possible, earlier versions) often > dies with "Floating exception" under FreeBSD 2.1R when compiled with > HAVE_SELECT defined. Especially when using uucp over TCP/IP. > > The problem is around line 2776 at libunix/serial.c ...and a couple of more places. Here's the patch i'm using to work around the SIGFPE: --- libunix/serial.c~ Mon Aug 28 12:33:21 1995 +++ libunix/serial.c Sat Oct 7 20:21:33 1995 @@ -2371,7 +2371,7 @@ else csleepchars = MAX_INPUT - 10; - isleep = (int) (((long) csleepchars * 10000L) / q->ibaud); + isleep = (int) (((long) csleepchars * 10000L) / (q->ibaud? q->ibaud: (long)1200)); isleep -= 10; if (isleep > 10) @@ -2773,8 +2773,8 @@ / baud bits/sec) * 10 bits/byte) */ - stime.tv_sec = (long) 10240 / q->ibaud; - stime.tv_usec = ((((long) 1024000000 / q->ibaud) * (long) 10) + stime.tv_sec = (long) 10240 / (q->ibaud? q->ibaud: (long)1200); + stime.tv_usec = ((((long) 1024000000 / (q->ibaud? q->ibaud: (long)1200)) * (long) 10) % (long) 1000000); imask = 1 << q->o; @@ -2846,7 +2846,7 @@ we don't need to use the catch stuff, since we know that HAVE_RESTARTABLE_SYSCALLS is 0. */ usset_signal (SIGALRM, usalarm, TRUE, (boolean *) NULL); - alarm ((int) ((long) 10240 / q->ibaud) + 1); + alarm ((int) ((long) 10240 / (q->ibaud? q->ibaud: (long)1200)) + 1); /* There is a race condition here: on a severely loaded system, we could get the alarm before we start the The problem is known to Ian Taylor and Andrey Chernov, and i still believe the entire Baud rate logic is bogus (since today's modems tend to run with DTE speeds much higher than the line speeds anyway). -- 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. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512080900.KAA22615>