[bug #67687] make doesn't return jobserver tokens as a client on SIGINT

Dmitry Goncharov <[email protected]> Fri, 14 Nov 2025 22:29:26 -0500 (EST)
Newsgroups gmane.comp.gnu.make.bugs
Message-ID <[email protected]>
Follow-up Comment #3, bug #67687 (group make):

Thank you for your report.

It is easier to reproduce with make itself as a jobserver host.


$ ls
child.mk  top.mk
$ cat top.mk
all:; @$(MAKE) -f child.mk
$
$
$ cat child.mk
all: a b c
a b:; sleep 180
c:; sleep 2 && kill -15 $$PPID
$
$
$ ~/src/gmake/make//l64/make --no-print-directory  -f top.mk -j3
sleep 180
sleep 180
sleep 2 && kill -15 $PPID
make[1]: *** [child.mk:2: b] Terminated
make[1]: *** [child.mk:2: a] Terminated
make: *** [top.mk:1: all] Terminated
make: INTERNAL: exiting with 1 jobserver tokens available; should be 3!


The patch in the attachment runs jobserver_clear after reaping children.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?67687>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaRfzlgAKCRCqLAuaBUf3
Tl02APsE68zHBnIpWMTuH22qKnHQkofnRIox1utebb0yxqEQkAEA8zMQuuGDMsNX
/4FPPErbVBC+xk3RdVDH+u71DPh+Fwk=
=Rdk3
-----END PGP SIGNATURE-----