Bioperl: How to set a time limit?

Joseph Ryan jfryan@nhgri.nih.gov
Tue, 13 Jan 1998 12:58:37 -0500 (EST)


How do I timeout a slow event? 

Use the alarm function, probably in conjunction with a signal handler, as
documented Signals and chapter 6 of the Camel. You may instead use the
more flexible Sys::AlarmCall module available from CPAN. 

Taken from perlfaq8 available at http://language.perl.com/faq

--Joe

On Tue, 13 Jan 1998, Alexander Sczyrba wrote:

> 
> Is there a way in Perl to set a time limit on running shell programs?
> Let's say I'd like a script to allow a program 5 minutes to 
> execute, terminate the program and then move on.
> 
> Our WWW server terminates the connection after 5 minutes. So if a user
> submits data that will run a process for more than 5 minutes, he gets
> a 'document contains no data' back.  How can I solve this?
> 
> Thanks in advance,
> Alexander
> 
> -- 
> +------------------------------------------------------------------------+
> | Alexander Sczyrba             email: asczyrba@techfak.uni-bielefeld.de |
> |                                                                        |
> | Department of Computer Science and Biotechnology                       |
> | University of Bielefeld, Germany                                       |
> +------------------------------------------------------------------------+
> 
> =========== Bioperl Project Mailing List Message Footer =======
> Project URL: http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/
> For info about how to (un)subscribe, where messages are archived, etc:
> http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
> ====================================================================
> 


=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
====================================================================