[2019-10-17 15:04] Martin von Wittich <martin.von.witt...@iserv.eu>
> I also just noticed this issue. We have a piece of code in our
> software that uses pidof to wait to apcupsd to start; I've reduced it
> to the following minimal working example:
> [...]

> There's always at least 4-6 empty "pidof:" lines at the beginning, so
> apparently pidof never works in the ~40-60ms after a process was
> launched.

That sounds explainable. pidof() scans /proc directory, and it takes some
time for kernel to create entry there.

> But there are almost always holes in the output further on, so it's
> also slightly unreliable afterwards.

This is really wierd, given that pid is same: process is not restarted.

> #!/bin/bash
>
> set -eu
>
> systemctl restart apcupsd

Do you have receipe to reproduce issue on systemd-free box, so I can try
to debug issue myself?
-- 
Note, that I send and fetch email in batch, once in a few days.
Please, mention in body of your reply when you add or remove recepients.

Reply via email to