[Classiccity-pm] Timeout
Linda Dubes Law
lindadl at uga.edu
Thu Mar 2 10:17:32 PST 2006
Nathan Hruby is my hero! Here is what I added and it works brilliantly.
***********************
eval {
alarm(600);
chomp ($task = <STDIN>);
};
if ($@) {
exit(1);
};
***********************
Thanks,
Linda
-----Original Message-----
From: classiccity-pm-bounces+lindadl=uga.edu at pm.org
[mailto:classiccity-pm-bounces+lindadl=uga.edu at pm.org] On Behalf Of nathan
r. hruby
Sent: Thursday, March 02, 2006 12:50 PM
To: All purpose mailing list for Athens, Ga Perl Mongers
Subject: Re: [Classiccity-pm] Timeout
On Thu, 2 Mar 2006, Linda Dubes Law wrote:
> Paul Keck made me join this list because he was jealous of Leslie
> Grove because she got to have all the fun of helping me solve all of
> my interesting perl problems. Just kidding.
>
> Here is today's problem:
>
> Running on HP/UX, certain users login and are thrown into a perl menu
> script. They can go from there to other perl scripts that I want to
> time out after a very short time compared to the menu. They can also
> go to third party software but always end up back at this menu and
> thrown out of the system when they quit the menu. The third party
> software has its own timeout function that works great and has to stay
> because many of the users only see the third party software. Not
> everyone gets the pleasure of seeing the results of my scripts.
>
> Anyway, is there something that I can put between these two lines that
> will kick the user out of the system while the script is waiting for
input?
>
> print "\n\n Q or q to quit : ";
>
> chomp ($task = <STDIN>);
>
"perldoc -f alarm" and rejoyce!
--
-------------------------------------------
nathan hruby <nhruby at uga.edu>
uga enterprise information technology services core services support
-------------------------------------------
"In 1972 a crack commando unit was sent to
prison by a military court for a crime they
didn't commit...."
_______________________________________________
Classiccity-pm mailing list
Classiccity-pm at pm.org
http://mail.pm.org/mailman/listinfo/classiccity-pm
More information about the Classiccity-pm
mailing list