test: avoid left behind child processes
Extend the Linux logic in test-child-process-exec-abortcontroller-promisified to all POSIX platforms.
Fixes: https://github.com/nodejs/build/issues/3154 Refs: https://github.com/nodejs/node/pull/37572#discussion_r585634725 Refs: https://github.com/nodejs/node/issues/37518
This unblocks the SmartOS CI for Node.js 14 and 16 that has been failing since we migrated the smartos machines at the end of last year. I'm opening this on main (which hasn't been failing) so I can cherry pick the same fix to both v16.x-staging and v14.x-staging. My main aim here is to unblock the CI.
To clarify, the test itself passes but is leaving behind child processes, which cause the CI run to fail as it checks for left over node
processes at the end of the test run.
cc @nodejs/releasers @bahamat