supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "Casper Ti. Vector" <caspervector@gmail.com>
To: supervision@list.skarnet.org
Subject: Re: race condition in killall
Date: Tue, 7 May 2019 22:46:48 +0800	[thread overview]
Message-ID: <20190507144648.GA2979@CasperVector> (raw)
In-Reply-To: <20190505015551.GF2595@panda>

On Sun, May 05, 2019 at 03:55:51AM +0200, sysinit@yandex.com wrote:
> since they do more work to select processes and hence need more time
> when iterating the PID dirs in the procfs?  though i doubt they use
> any matching at all when tasked with killing all processes and
> probably behave like the killall5 utility in this situation.

The original snippet on gitlab-2.asag.io used `pkill -SIG .'; and it
seemed that they had really encounterred escaped processes, because they
said:
> the "sync" was added just in case mounting read-only doesn't work

> OpenRC also provides a tool for that task btw:
> /libexec/rc/bin/kill_all
> it uses the kvm method to find running processes on the BSDs and the
> procfs on Linux.

Or use chainloading and `kill -9 -1': both are simple and portable.

-- 
My current OpenPGP key:
RSA4096/0x227E8CAAB7AA186C (expires: 2020.10.19)
7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C



  reply	other threads:[~2019-05-07 14:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-17 13:25 Update on the progress of slew development Casper Ti. Vector
2019-03-17 14:30 ` Oliver Schad
2019-03-18 14:44   ` Casper Ti. Vector
2019-03-19 12:10     ` Casper Ti. Vector
2019-03-19 12:42   ` Casper Ti. Vector
2019-03-19 15:25     ` Casper Ti. Vector
2019-03-19 15:58     ` Oliver Schad
     [not found]       ` <20190320051439.GA7636@caspervector>
2019-03-20  5:14       ` Casper Ti. Vector
2019-03-20 11:51         ` Casper Ti. Vector
2019-05-04  6:07         ` Casper Ti. Vector
2019-05-05  1:55           ` race condition in killall sysinit
2019-05-07 14:46             ` Casper Ti. Vector [this message]
2019-05-11 18:29             ` Guillermo
2019-05-11 19:26               ` Laurent Bercot
2019-09-27 17:42 ` Update on the progress of slew development Casper Ti. Vector

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=20190507144648.GA2979@CasperVector \
    --to=caspervector@gmail.com \
    --cc=supervision@list.skarnet.org \
    /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).