David, is this anything like 'read -t' in less-stripped
(non-lrp) systems? Tom Eastep, the guy who wrote Seattle
Firewall, had to work around a missing '-t' option in
read for the LRP package of Seawall...

On Wed, Jan 24, 2001 at 01:38:38PM -0600, David Douthitt scribbled:
> I thought I had it figured out.... but not so.
> 
> GOAL: To create a program "timeread" with syntax:
> 
> timeread <secs> <prompt>
> 
> which returns the input value on stdout, or an exit value of 1 if 
> timedout, or 2 if aborted by the user.
> 
> METHOD:
> 
> The current method I'm using is to spawn a process (background) 
> which will sleep the appropriate amount of time, then kill the 
> prompting process, which catches the signal and acts 
> appropriately.
> 
> The flip side is that if input is taken, then the spawned sleeper 
> process is killed and the program exits with data on stdout.
> 
> PROBLEM(S):
> 
> 1. The original process can't kill the sleeper; sleep appears to 
> ignore all signals until AFTER it is complete; GNU sleep does this 
> too.
> 
> 2. The original process can't exit until its children (i.e., the sleeper 
> process) completes - it becomes (almost) a zombie.
> 
> SOLUTION:
> 
> Anyone know?
> 
> -- 
> David Douthitt
> UNIX Systems Administrator
> HP-UX, Linux, Unixware
> [EMAIL PROTECTED]
> 
> _______________________________________________
> Leaf-devel mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/leaf-devel

-- 
rick -- A mind is like a parachute... it only works when it's open.

ICQ# 1590117                           [EMAIL PROTECTED] (home)   
Help with LRP: http://lrp.c0wz.com     Home page: http://www.c0wz.com

_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to