[bug #67822] GNU make does not write back the same character it read from the jobserver

Dmitry Goncharov <[email protected]> Sat, 21 Mar 2026 09:53:08 -0400 (EDT)
Newsgroups gmane.comp.gnu.make.bugs
Message-ID <[email protected]>
--8323329-1189641421-1774101188=:2863477
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline

Follow-up Comment #3, bug #67822 (group make):=0A=0AIt is not possible to r=
eturn the token that started the job.=0A=0AConsider the following.=0AMake i=
s running with -j2 and needs to build targets x, y and z.=0AMake spawns the=
 first child and this child is using the free token to build=0Ax.=0AMake sp=
awn another child and this second child obtains a token from the=0Ajobserve=
r to build y.=0AMake is now waiting for one of these two jobs to finish bef=
ore make can start=0Aanother job to build z.=0AThe first child finishes fir=
st. At this point there is only one outstanding=0Ajob (y) and make can begi=
n z.=0AWell, there is no token to release, because the first child was usin=
g the free=0Atoken. However, some token has to be released to unblock the  =
reader who is=0Ablocked on the pipe waiting for a token.=0ABefore this patc=
h make would release a hardcoded token '+'. With this patch=0Amakes release=
s one token of the earlier acquired tokens. But this token cannot=0Abe the =
token that started the job, because the job was running on a free=0Atoken.=
=0A=0A=0A    _______________________________________________________=0A=0AR=
eply to this item at:=0A=0A  <https://savannah.gnu.org/bugs/?67822>=0A=0A__=
_____________________________________________=0AMessage sent via Savannah=
=0Ahttps://savannah.gnu.org/=0A
--8323329-1189641421-1774101188=:2863477
Content-Type: APPLICATION/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCab6ixAAKCRCqLAuaBUf3
TnYTAP9zvSc7iLIMbZqF9XdaVWcXM19uANhLFEdpSYDHuPeWLQD/XZw/IhhQb/hv
6SCe+9VEPVD3q98iYEKuLGxVxPFGEQk=
=Kej0
-----END PGP SIGNATURE-----

--8323329-1189641421-1774101188=:2863477--