close program with timeout

Lorenzo Taylor daxlinux at gmail.com
Fri May 1 19:57:52 UTC 2009


I'm not sure about expect, although I believe it does have the ability to close 
a program after a specified time. However, the simplest way is to install the 
timeout package. Then you simply type:

timeout [-<OptionalNumericSignal>] <seconds> <program with argumants>

and the program will run for the specified number of seconds. If you do not 
specify a signal, timeout will send SIGKILL.

HTH,
Lorenzo




More information about the ubuntu-users mailing list