I'm on Sierra 10.12.4, though I don't believe the exact version should matter.
On Mac OS X, when creating processes and never writing anything to their stdin, the closeQueue of every ProcessKqueue will only accumulate processes, and never be emptied.
This causes processes after 512 * numThreads to stop reporting their exits properly (BasePosixProcess.onExit leaves the happy path way too early).
It seems that processes are added to the closeQueue whenever they finish, but closeQueue is only drained when receiving a SIGUSR2, which only happens when queueing a write (or queueing a STDIN_CLOSED_PENDING_WRITE_TOMBSTONE).
To make it work, I could close each process' stdin right after starting them, but it doesn't look like I should have to.
I'm on Sierra 10.12.4, though I don't believe the exact version should matter.
On Mac OS X, when creating processes and never writing anything to their stdin, the
closeQueue
of everyProcessKqueue
will only accumulate processes, and never be emptied. This causes processes after512 * numThreads
to stop reporting their exits properly (BasePosixProcess.onExit
leaves the happy path way too early).It seems that processes are added to the
closeQueue
whenever they finish, butcloseQueue
is only drained when receiving aSIGUSR2
, which only happens when queueing a write (or queueing aSTDIN_CLOSED_PENDING_WRITE_TOMBSTONE
).To make it work, I could close each process' stdin right after starting them, but it doesn't look like I should have to.