Skip to content

fix ProcessSpawn on BSD

Andrei Pavel requested to merge 3025-fix-process-spawn-failures-on-freebsd into master

Closes #3025 (closed) a third time.

  • d3a53ac7 fix ProcessSpawn on BSD

    • Always WNOHANG because waitpid is called in a loop anyway, so we can simulate hanging.
    • Always break after collecting exit status. Previously it broke the loop always on failure of waitpid which does happen after calling it multiple times.
    • When waitpid returns -1 in sync mode, throw exception.
    • Only initialize the global IO signal set on the IO service in async mode. It makes no sense to do it in sync mode because there is no IO service.
    • Swap pid and wpid names to conform to names in man wait on BSD.
Edited by Andrei Pavel

Merge request reports