-
Notifications
You must be signed in to change notification settings - Fork 357
[tools] Fix not utility to work on iOS #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This addresses issue #77137. The implementation uses posix_spawn on iOS but std::system elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look sensible to me, assuming that posix_spawn and waitpid on iOS are standards compliant. However, I have no experience writing software for iOS. Please wait for approval by somebody who can test on iOS.
As posix_spawn is part of POSIX, it is probably reasonably well available on other platforms (although I don't know about Windows). Perhaps we could get away without the #ifdef here. I don't feel strongly about this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! I am not very familiar with iOS process calls.
…er comments from the code review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please wait for someone to verify it on iOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with an include path fix.
tools/not.cpp
Outdated
int main(int argc, const char **argv) { | ||
#ifdef __APPLE__ | ||
#include <spawn.h> | ||
#include <wait.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <wait.h> | |
#include <sys/wait.h> |
thank you! |
This addresses issue #77137 (std::system is not available on iOS). The implementation uses posix_spawn on iOS but std::system elsewhere.
This has only been tested on Linux on X86 and an older AArch64.
@jroelofs, could you try this on an iOS and let me know if it works there?