[Bug 294089] www/gitea: service gitea restart fails, leaves gitea stopped

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 16 Apr 2026 10:29:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294089

--- Comment #3 from Christian Ullrich <chris@chrullrich.net> ---
(In reply to ports@foss-daily.org from comment #2)

> I couldn’t reproduce this on 15.0-RELEASE-p5 (amd64) in a VM after
> repeated service gitea restart attempts.

Neither can I now, but it did happen.

Adding a bit of delay just before the waitpid() call in daemon (i.e. after the
SIGCHLD has arrived and before daemon acknowledges the death of the child) I
can reproduce the error at will.

It takes about 170 ms of delay on this system. That is certainly a lot, but it
demonstrates that rc.subr's approach of waiting for kqueue to report the
process exiting and then rechecking with ps is invalid, at least if there is
something waiting for the target process.

-- 
You are receiving this mail because:
You are the assignee for the bug.