-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: popen and pclose error reporting
* Set errno for popen and pclose for WIN32 just like POSIX does (at least mingw64+wine seems to decode the error message without doing anything extra) * A work around for popen/pclose: complicated but works * Refactored popen/pclose into custom implementation and added c++ wrappers * Removed exceptions and cleaned up process pipe api * Refactored popen/pclose into C++ class * Fixed trivial issues for Linux * Simplified the move semantics by avoiding virtual functions * Moved error reporting into common_pipe * Simplified open and close in case the pipe is already opened/closed * Fixed error handling for MSVC, which very weird: MSVC rejects strerror, suggest to use "secure" strerror_s, but then does not supply strerrorlen_s GCC does not provide strerror_s, looks like strerror is good enough there. * MSVC is not following any standards
- Loading branch information
1 parent
e4ce497
commit 4afebf1
Showing
5 changed files
with
354 additions
and
144 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
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
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
Oops, something went wrong.