-
Notifications
You must be signed in to change notification settings - Fork 463
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Common): fixes for ffProcessAppendOutput
- Use pipe2 on Linux and BSDs, which can set all flags through a single syscall. - macOS/darwin does not support pipe2, add a wrapper for it. - Close pipes when fork() failed. These fds should be closed when the function returns. - Set O_CLOEXEC at pipes, the exec() family of functions will close this fds automatically. - Use _exit instead of exit. Exit calls the callbacks registered by atexit and flushes the stdio's buffer, which can lead to some unexpected behavior, especially after an exec syscall failure. - Fix timeout. - Not use non-blocking IO. because we only wait for one file, and cannot do other things during waiting.
- Loading branch information
1 parent
968a43c
commit 50c2bde
Showing
1 changed file
with
32 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters