Skip site navigation (1)Skip section navigation (2)
Date:      26 Dec 2006 23:45:25 -0000
From:      John Levine <johnl@iecc.com>
To:        freebsd-questions@freebsd.org
Cc:        kelly.terry.jones@gmail.com
Subject:   Re: Unix/sh/bash/tcsh command to limit clock time for program?
Message-ID:  <20061226234525.72192.qmail@simone.iecc.com>
In-Reply-To: <26face530612261526r3954a4d6m972feba654b332b9@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
>Is there a Unix or shell command that runs a given program for n
>seconds and then terminates it (unless the program takes less than n
>seconds to run, obviously)?

  some-command& sleep 42; kill -9 $!

R's,
John



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20061226234525.72192.qmail>