fix broken thread list unlocking after fork
authorRich Felker <dalias@aerifal.cx>
Thu, 1 Jun 2023 20:09:32 +0000 (16:09 -0400)
committerRich Felker <dalias@aerifal.cx>
Thu, 1 Jun 2023 20:15:37 +0000 (16:15 -0400)
commit0c277ff156749628c678257f878d3a6edb5868de
tree4334f6b20d18c27ebb81e55fba47b14dcc5e6963
parent4653b98711f280270fa049654460610f587ba7b4
fix broken thread list unlocking after fork

apparently Linux clears the registered exit futex address on fork.
this means that, if after forking the child process becomes
multithreaded and the original thread exits, the thread list will
never be unlocked, and future attempts to use the thread list will
deadlock.

re-register the exit futex address after _Fork in the child to ensure
that it's preserved.
src/process/_Fork.c