From owner-freebsd-hackers Thu Apr 11 15:22:13 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id PAA17801 for hackers-outgoing; Thu, 11 Apr 1996 15:22:13 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id PAA17795 for ; Thu, 11 Apr 1996 15:22:07 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id AAA28327; Fri, 12 Apr 1996 00:21:56 +0200 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id AAA20819; Fri, 12 Apr 1996 00:21:55 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id AAA06483; Fri, 12 Apr 1996 00:01:21 +0200 (MET DST) From: J Wunsch Message-Id: <199604112201.AAA06483@uriah.heep.sax.de> Subject: Re: Need help with possible fbsd bug To: freebsd-hackers@freebsd.org (FreeBSD hackers) Date: Fri, 12 Apr 1996 00:01:19 +0200 (MET DST) Cc: chuck@bus.net (Chuck O'Donnell) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: from "Chuck O'Donnell" at Apr 10, 96 06:55:34 pm X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL24 ME8a] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk As Chuck O'Donnell wrote: While there's admittedly some bogosity with the pty handling (simple evidence: run ``cat < /dev/ttypf'' in one window, and say ``echo hello > /dev/ptypf'' in another one -- nothing will show up in the first window), a couple of nits: > so jove is being told that the write was successful, but 0 > bytes were written! Jove only checks whether the write was > successful, and doesn't pay attention to the length reported by > write. Jove will not retry this write, although that would be > reasonable. I would consider this an error: NAME write, writev - write output ... When using non-blocking I/O on objects such as sockets that are subject to flow control, write() and writev() may write fewer bytes than request- ed; the return value must be noted, and the remainder of the operation should be retried when possible. Now it's arguable whether a pty counts as ``subject to flow control'', but a short write is IMHO not an exception. > Notice that the amount returned by the read was the length > requested by bash. I think that a pty should return at most a > line at a time, even if the read requested more. What does make you think this? Tty's are not inherently line-bound, so if there were more than a line available (regardles of your actual problem with the multiple copies here), why should a read() only return one line? -- 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. ;-)