From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Fiona Klute via buildroot <buildroot@buildroot.org>
Cc: Bernd Kuhls <bernd@kuhls.net>, Fiona Klute <fiona.klute@gmx.de>
Subject: Re: [Buildroot] [PATCH 2/6] package/busybox: tidy up S01syslogd init script
Date: Fri, 12 Jul 2024 13:07:16 +0200 [thread overview]
Message-ID: <20240712130716.600a075e@windsurf> (raw)
In-Reply-To: <20240712094717.2539892-3-fiona.klute@gmx.de>
Hello Fiona,
Thanks for your work on this, much appreciated!
On Fri, 12 Jul 2024 11:47:13 +0200
Fiona Klute via buildroot <buildroot@buildroot.org> wrote:
> + # Wait for process to be gone, because Busybox'
> + # start-stop-daemon does not support --retry (as of 1.36.1).
> + while true; do
> + pid="$( cat "${PIDFILE}" 2>/dev/null || true )"
> + { [ -n "${pid}" ] && [ -d "/proc/${pid}" ]; } || break
> + sleep 0.1
I am not a big fan of this, and Arnout pointed out that Busybox
start-stop-daemon has the --status option:
-T,--status Check for the existence of a process, return exitcode (since version 1.16.1)
0 - program is running
1 - program is not running and the pid file exists
3 - program is not running
4 - can't determine program status
Could we use this instead of poking into /proc manually?
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-07-12 11:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 9:47 [Buildroot] [PATCH 0/6] Update init script style Fiona Klute via buildroot
2024-07-12 9:47 ` [Buildroot] [PATCH 1/6] docs/manual: describe relying on default options Fiona Klute via buildroot
2024-07-12 9:47 ` [Buildroot] [PATCH 2/6] package/busybox: tidy up S01syslogd init script Fiona Klute via buildroot
2024-07-12 11:07 ` Thomas Petazzoni via buildroot [this message]
2024-07-12 11:34 ` Fiona Klute via buildroot
2024-07-12 9:47 ` [Buildroot] [PATCH 3/6] docs/manual: include S01syslogd from source Fiona Klute via buildroot
2024-07-12 9:47 ` [Buildroot] [PATCH 4/6] package/openssh: tidy up init script Fiona Klute via buildroot
2024-07-12 9:47 ` [Buildroot] [PATCH 5/6] package/dnsmasq: " Fiona Klute via buildroot
2024-07-12 9:47 ` [Buildroot] [PATCH 6/6] package/network-manager: rewrite " Fiona Klute via buildroot
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=20240712130716.600a075e@windsurf \
--to=buildroot@buildroot.org \
--cc=bernd@kuhls.net \
--cc=fiona.klute@gmx.de \
--cc=thomas.petazzoni@bootlin.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