From owner-freebsd-hackers Sat May 2 09:10:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA13423 for freebsd-hackers-outgoing; Sat, 2 May 1998 09:10:45 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA13410 for ; Sat, 2 May 1998 09:10:38 -0700 (PDT) (envelope-from dag-erli@ifi.uio.no) Received: from skejdbrimir.ifi.uio.no (skejdbrimir.ifi.uio.no [129.240.65.2]) by ifi.uio.no (8.8.8/8.8.7/ifi0.2) with SMTP id SAA04866; Sat, 2 May 1998 18:10:24 +0200 (MET DST) Received: from localhost (dag-erli@localhost) by skejdbrimir.ifi.uio.no ; Sat, 2 May 1998 16:10:23 GMT Mime-Version: 1.0 To: samuel Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: what constitutes "UNCOOKED" mode References: <354A17DB.504B70D5@worldnet.att.net> Organization: Gutteklubben Terrasse / KRST / PUMS / YASMW X-url: http://www.stud.ifi.uio.no/~dag-erli/ X-Stop-Spam: http://www.cauce.org From: dag-erli@ifi.uio.no (Dag-Erling Coidan =?iso-8859-1?Q?Sm=F8rgrav?= ) Date: 02 May 1998 18:10:15 +0200 In-Reply-To: samuel's message of "Fri, 01 May 1998 18:43:39 +0000" Message-ID: Lines: 13 X-Mailer: Gnus v5.5/Emacs 19.34 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG samuel writes: > I have a simple question. In manipulating the termios structure I > normally set various fields to 0 thereby allowing my program to handle > input and output processing of read chars. Did you watch the load on your machine while your program ran? If you set all fields to 0, you put the terminal in raw, non-blocking mode, which means you are busy-looping reading EOF. Very suboptimal. Use cfmakeraw() instead (unfortunately, many widespread commercial Unices lack it so it's not very portable) -- Noone else has a .sig like this one. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message