From owner-freebsd-hackers Thu Jul 11 16:12: 2 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A920737B400 for ; Thu, 11 Jul 2002 16:12:00 -0700 (PDT) Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4086F43E09 for ; Thu, 11 Jul 2002 16:12:00 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0622.cvx40-bradley.dialup.earthlink.net ([216.244.44.112] helo=mindspring.com) by gull.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17Sn6J-0002sU-00; Thu, 11 Jul 2002 16:11:56 -0700 Message-ID: <3D2E107A.362AF9EB@mindspring.com> Date: Thu, 11 Jul 2002 16:10:50 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: bruno schwander Cc: Cyrille Lefevre , hackers@FreeBSD.ORG Subject: Re: termios guru ? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG bruno schwander wrote: > thanks, I see the idea but cfmakeraw has some other effects... newlines > output by the program are not translated, etc. > > My main program now is the VMIN/VTIME stuff. The way irit tries to use is, > is basically to be able to do async stdin reading, but this does not > work. Whenever I try those settings, no input is ever read by the > program. It fgetc() constantly returns -1. > > Any idea why ? In noncanonical mode input processing, input bytes are not assembled into lines, and erase and kill processing does not occur. The values of the VMIN and VTIME members of the c_cc array are used to determine how to process the bytes received. MIN represents the minimum number of bytes that should be received when the read(2) function successfully returns. TIME is a timer of 0.1 second granularity that is used to time out bursty and short term data transmis- sions. If MIN is greater than { MAX_INPUT}, the response to the request is undefined. The four possible values for MIN and TIME and their inter- actions are described below. What's "MAX_INPUT" set to? Try running: system("stty -a"); From your program, after you set the terminal modes, to make sure you set them correctly. Make sure you are using termios, not termio. See also the source code to raw(3) and cbreak(3) in the curses library source code. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message