From owner-freebsd-hackers Fri Sep 26 08:15:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA09801 for hackers-outgoing; Fri, 26 Sep 1997 08:15:14 -0700 (PDT) Received: from word.smith.net.au (word.smith.net.au [202.0.75.3]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA09794 for ; Fri, 26 Sep 1997 08:15:10 -0700 (PDT) Received: from word.smith.net.au (localhost.smith.net.au [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id AAA01871; Sat, 27 Sep 1997 00:41:58 +0930 (CST) Message-Id: <199709261511.AAA01871@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: Jon Hamilton cc: Terry Lambert , hackers@FreeBSD.ORG Subject: Re: Timeout for sh(1) 'read' ?? In-reply-to: Your message of "Fri, 26 Sep 1997 07:58:02 EST." <199709261259.FAA03276@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 27 Sep 1997 00:41:56 +0930 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > } > > } > - I want to prompt for input using 'read', and have the read return in > } > some fashion after a timeout. > } > > } > I'd like to do this just using sh, and I'm not too fussed about how > } > hairy it is. Any ideas? > } > > } > (If sh has to be modified to achieve this, would it be a useful thing > } > to bring back?) ... > You can do this kind of thing with background processes and trap, but > it's not what you'd call pretty, and even that isn't as straightforward > as it might sound. In other words, it would be a good thing for read to have a timeout option : correct? Any objections? mike