From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1023 Path: news.gmane.org!not-for-mail From: Alex Efros Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: timeout chpst -L Date: Mon, 13 Feb 2006 22:18:07 +0200 Organization: asdfGroup Inc., http://powerman.asdfGroup.com/ Message-ID: <20060213201807.GF6585@home.power> References: <20060213163054.GC2511@home.power> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139861929 23537 80.91.229.2 (13 Feb 2006 20:18:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Feb 2006 20:18:49 +0000 (UTC) Original-X-From: supervision-return-1259-gcsg-supervision=m.gmane.org@list.skarnet.org Mon Feb 13 21:18:48 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1F8k9A-0005GV-9M for gcsg-supervision@gmane.org; Mon, 13 Feb 2006 21:18:09 +0100 Original-Received: (qmail 6392 invoked by uid 76); 13 Feb 2006 20:18:29 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 6386 invoked from network); 13 Feb 2006 20:18:29 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <20060213163054.GC2511@home.power> User-Agent: Mutt/1.5.11 Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1023 Archived-At: Hi! On Mon, Feb 13, 2006 at 06:30:54PM +0200, Alex Efros wrote: > Is there exists some standard utility to run other process with timeout? > ulimit isn't suitable because it can only limit used CPU time, while I'm > speaking about real time. I've just discovered `tryto`. Sadly, but looks like there some race condition bug in it when tryto used to run some process which exit very quickly. I've tried to run `tryto chpst -l`, noticed strange results and moved to more simple examples like `tryto true` (see details below). > My goal is run `chpst -L` but don't allow it to hang forever. Of course, I mean -l option here, not -L. Another fun thing is timelimit(8) mentioned on tryto(1). Google doesn't know what is 'timelimit(8)' or know but refrain from saying to me. :-) powerman@home ~/tmp $ for i in $(seq 1 10); do echo "i=$i"; tryto -v -t 2 bash -c 'true'; done i=1 tryto: warning: child "bash" timed out. sending TERM... tryto: warning: child "bash" not terminated. sending KILL... tryto: fatal: child timed out, giving up. i=2 tryto: warning: child "bash" timed out. sending TERM... tryto: warning: child "bash" not terminated. sending KILL... tryto: fatal: child timed out, giving up. i=3 tryto: warning: child "bash" timed out. sending TERM... tryto: warning: child "bash" not terminated. sending KILL... tryto: fatal: child timed out, giving up. i=4 tryto: warning: child "bash" timed out. sending TERM... tryto: warning: child "bash" not terminated. sending KILL... tryto: fatal: child timed out, giving up. i=5 tryto: warning: child "bash" timed out. sending TERM... tryto: warning: child "bash" not terminated. sending KILL... tryto: fatal: child timed out, giving up. i=6 i=7 i=8 i=9 tryto: warning: child "bash" timed out. sending TERM... tryto: warning: child "bash" not terminated. sending KILL... tryto: fatal: child timed out, giving up. i=10 tryto: warning: child "bash" timed out. sending TERM... tryto: warning: child "bash" not terminated. sending KILL... tryto: fatal: child timed out, giving up. -- WBR, Alex.