From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 16 15:47:40 2003 Return-Path: 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 D0CAF16A4B3 for ; Tue, 16 Sep 2003 15:47:40 -0700 (PDT) Received: from fever.boogie.com (cpe-66-87-52-132.co.sprintbbd.net [66.87.52.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id D042943FAF for ; Tue, 16 Sep 2003 15:47:39 -0700 (PDT) (envelope-from durian@boogie.com) Received: from man.boogie.com (man.boogie.com [192.168.1.3]) by fever.boogie.com (8.12.9/8.12.9) with ESMTP id h8GMldLF097915 for ; Tue, 16 Sep 2003 16:47:39 -0600 (MDT) (envelope-from durian@boogie.com) From: Mike Durian To: hackers@freebsd.org Date: Tue, 16 Sep 2003 16:47:38 -0600 User-Agent: KMail/1.5.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200309161647.38197.durian@boogie.com> Subject: tty layer and lbolt sleeps X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2003 22:47:40 -0000 I'm trying to implement a serial protocol that is timing sensitive. I'm noticing things like drains and reads and blocking until the next kernel tick. I believe this is due to the lbolt sleeps in the tty.c code. It looks like I can avoid these sleeps if isbackground() returns false, however I can't figure out how to make this happen. The process is running in the foreground and my attempts to play with the process group haven't helped. Can anyone explain what is happening and nudge me towards a fix? mike