supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Alex Efros <powerman@powerman.asdfGroup.com>
Subject: Re: timeout chpst -L
Date: Mon, 13 Feb 2006 22:18:07 +0200	[thread overview]
Message-ID: <20060213201807.GF6585@home.power> (raw)
In-Reply-To: <20060213163054.GC2511@home.power>

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.


  reply	other threads:[~2006-02-13 20:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-13 16:30 Alex Efros
2006-02-13 20:18 ` Alex Efros [this message]
2006-02-14  8:45   ` Gerrit Pape
2006-02-14 10:23     ` Alex Efros
2006-02-14 10:36       ` Gerrit Pape
2006-02-14 11:01         ` Alex Efros
2006-02-14 11:21           ` Gerrit Pape
2006-02-14 11:30             ` Alex Efros
2006-02-14 11:36               ` Gerrit Pape
2006-02-14 11:54                 ` Alex Efros
2006-02-14 12:39                   ` Gerrit Pape
2006-02-14 12:53                     ` Alex Efros

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060213201807.GF6585@home.power \
    --to=powerman@powerman.asdfgroup.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).