child_process: fix handling of incorrect uid/gid in spawn
uid/gid must be int32, which is asserted on a c++ side but wasn't checked on a JS side and therefore resulted in a process crash.
Refs: https://github.com/nodejs/node/issues/22570
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Also, I'm not sure about the 'correct type' in TypeError, is 'int32' okay?