Simplify process_wait()

The function process_wait() returned a bool (true if the process
terminated successfully) and provided the exit code via an output
parameter exit_code.

But the returned value was always equivalent to exit_code == 0, so just
return the exit code instead.
This commit is contained in:
Romain Vimont
2021-01-22 18:29:21 +01:00
parent 94eff0a4bb
commit b8edcf52b0
6 changed files with 30 additions and 36 deletions

View File

@@ -47,12 +47,12 @@ bool
process_terminate(process_t pid);
// wait and close the process (like waitpid())
bool
process_wait(process_t pid, exit_code_t *exit_code);
exit_code_t
process_wait(process_t pid);
// wait (but does not close) the process (waitid() with WNOWAIT)
bool
process_wait_noclose(process_t pid, exit_code_t *exit_code);
exit_code_t
process_wait_noclose(process_t pid);
// close the process
//