Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jan 2009 21:27:52 +0000
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: shell scripting, how to auto-timeout?
Message-ID:  <20090122212752.6fd5f8fb@gumby.homeunix.com>
In-Reply-To: <560f92640901221241y4fc1620aree083a812c1f3c8d@mail.gmail.com>
References:  <560f92640901221241y4fc1620aree083a812c1f3c8d@mail.gmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Thu, 22 Jan 2009 12:41:14 -0800
Nerius Landys <nlandys@gmail.com> wrote:


> /usr/local/bin/java PipeGenerator $* &
> sleep 1
> <kill the java command if not already killed>
> 
> Also with the above code I would be waiting for 1 second even if the
> java process finished sooner.  But that is a penalty I'm willing to
> pay, unless there is a more elegant solution.

sleep 1 && <kill the java command> &




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