How to time out a program in bash

Kevin O'Gorman kogorman at gmail.com
Tue Oct 6 17:22:13 UTC 2009


I'm not sure where to ask this, but surely there are bash script experts
watching...

I'm trying to write a bash script to test a some student programs.  Some of
them
get wedged, and I can use ulimit to catch most of that.  However, if they
wedge
reading stdin when they are not supposed to, ulimit does not catch them.

Can a bash script use an alarm?  Anybody have a quick recipe?  Or another
approach?

++ kevin

-- 
Kevin O'Gorman, PhD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20091006/baf2b079/attachment.html>


More information about the ubuntu-users mailing list