Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!pacbell.com!decwrl!elroy.jpl.nasa.gov!forsight!jato!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: time-limit on a ? Message-ID: <9000@jpl-devvax.JPL.NASA.GOV> Date: 3 Aug 90 21:13:11 GMT References: <12170009@hpccc.HP.COM> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 17 In article <12170009@hpccc.HP.COM> weisberg@hpccc.HP.COM (Len Weisberg) writes: : Any ideas on how to set a time-limit on a ? : If no input is received after a second or so, the program should : continue to a graceful exit. If you have select: vec($rin,0,1) = 1; if (select($rout = $rin, undef, undef, 1.0)) { $answer = ; } Other solutions with syscall come to mind. If you're desperate, fork, sleep and kill. Larry