From owner-freebsd-bugs Sun Apr 29 7:10:12 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 194C937B42C for ; Sun, 29 Apr 2001 07:10:06 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f3TEA5N13031; Sun, 29 Apr 2001 07:10:05 -0700 (PDT) (envelope-from gnats) Date: Sun, 29 Apr 2001 07:10:05 -0700 (PDT) Message-Id: <200104291410.f3TEA5N13031@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Boris Nikolaus Subject: Re: kern/23173: read hangs in linux emulation Reply-To: Boris Nikolaus Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/23173; it has been noted by GNATS. From: Boris Nikolaus To: freebsd-gnats-submit@FreeBSD.org Cc: bbl@dk.damgaard.com, marcel@FreeBSD.org Subject: Re: kern/23173: read hangs in linux emulation Date: Sun, 29 Apr 2001 04:36:05 +0200 Hi Bjarne. There's a bug in the termios struct conversion, which replaces 0 in VMIN and VTIME by 255 (as it substitutes all _POSIX_VDISABLE from Linux (0) by _POSIX_VDISABLE from FreeBSD (255) in termios.c_cc[]). The following patch for /usr/src/sys/compat/linux/linux_ioctl.c will fix this problem: *** linux_ioctl.c.orig Sat Apr 28 03:08:21 2001 --- linux_ioctl.c Sun Apr 29 04:22:10 2001 *************** *** 321,327 **** lios->c_cc[LINUX_VLNEXT] = bios->c_cc[VLNEXT]; for (i=0; ic_cc[i] == _POSIX_VDISABLE) lios->c_cc[i] = LINUX_POSIX_VDISABLE; } lios->c_line = 0; --- 321,328 ---- lios->c_cc[LINUX_VLNEXT] = bios->c_cc[VLNEXT]; for (i=0; ic_cc[i] == _POSIX_VDISABLE) lios->c_cc[i] = LINUX_POSIX_VDISABLE; } lios->c_line = 0; *************** *** 454,460 **** bios->c_cc[VLNEXT] = lios->c_cc[LINUX_VLNEXT]; for (i=0; ic_cc[i] == LINUX_POSIX_VDISABLE) bios->c_cc[i] = _POSIX_VDISABLE; } --- 455,462 ---- bios->c_cc[VLNEXT] = lios->c_cc[LINUX_VLNEXT]; for (i=0; ic_cc[i] == LINUX_POSIX_VDISABLE) bios->c_cc[i] = _POSIX_VDISABLE; } Greetings, Boris Nikolaus P.S.: Your test program is missing a "st_tbuf = old_st;" after the tcgetattr. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message