Running a program for a set amount of time

Dan Osterrath do3 at mail.inf.tu-dresden.de
Tue Nov 26 05:42:44 PST 2002


> function runandkill () {
> 	exec $1 &
> 	sleep $2
> 	kill $(pidof $1)
> }

I think exec replaces the actual shell by the new program.
A simple "$1 &" would do it, wouldn't?

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message



More information about the blfs-support mailing list