util/process_wrapper: system_posix.cc: use waitpid correctly (#755) * util/process_wrapper: system_posix.cc: use waitpid correctly. At head, System::Exec uses waitpid() to wait on a forked child and return its exit status. but it uses the system call incorrectly. as documented in man 2 waitpid, the WIFEXITED, WIFSIGNALED, etc. macros must be used on the status returned by waitpid() to determine if the child exited normally, was terminated, etc. returning the raw integer returned by waitpid() as the overall exit status, as happens currently, is nonportable. how a signal/exit status/etc. is represented inside the integer has never been standardized as part of posix, and i suspect that returning it can cause bazel to get confused about the exit status of the action, leading to #708. Authored-by: Ubehebe <brendan.linn@gmail.com> Co-authored-by: UebelAndre <github@uebelandre.com>
This repository provides rules for building Rust projects with Bazel.
Please refer to the full documentation.