From owner-freebsd-hackers Fri Sep 26 14:11:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA27980 for hackers-outgoing; Fri, 26 Sep 1997 14:11:41 -0700 (PDT) Received: from usr08.primenet.com (tlambert@usr08.primenet.com [206.165.6.208]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id OAA27972 for ; Fri, 26 Sep 1997 14:11:37 -0700 (PDT) Received: (from tlambert@localhost) by usr08.primenet.com (8.8.5/8.8.5) id OAA13659; Fri, 26 Sep 1997 14:11:14 -0700 (MST) From: Terry Lambert Message-Id: <199709262111.OAA13659@usr08.primenet.com> Subject: Re: Timeout for sh(1) 'read' ?? To: mike@smith.net.au (Mike Smith) Date: Fri, 26 Sep 1997 21:11:13 +0000 (GMT) Cc: hamilton@pobox.com, tlambert@primenet.com, hackers@FreeBSD.ORG In-Reply-To: <199709261511.AAA01871@word.smith.net.au> from "Mike Smith" at Sep 27, 97 00:41:56 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > 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? How about: timeout 30 -inactivity `tty` read x instead? Then it could be used on any command. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.