-
Notifications
You must be signed in to change notification settings - Fork 182
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
Grab-bag of fixes for OS X #1093
Conversation
f7c7075
to
ea72ae3
Compare
On GNU systems, strerror_r() returns char*, but on XSI systems it returns int. When checking the return value, we need to either compare with 0 or nullptr.
/bin/sh on OS X is very limited. Also, do some very minor cleanup.
On OS X, symbols are prepended with an underscore.
These have fixes for running on OS X.
@@ -42,7 +42,7 @@ TEST(SubprocessTest, EmptyArgvFails) { | |||
|
|||
TEST(SubprocessTest, NonZeroExitWorks) { | |||
auto result = InvokeSubprocess( | |||
{"/bin/sh", "-c", "echo -n hey && echo -n hello >&2 && exit 10"}, | |||
{"/bin/bash", "-c", "echo -n hey && echo -n hello >&2 && exit 10"}, |
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.
While /bin/sh
is pretty universally installed on Unix-like systems, /bin/bash
is not (and so this test fails now on minimal Unix systems or where bash
is in a different path).
What were the things that didn't work in OSX, could we re-work it to work with the minimal bourne shell available there ?
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.
The flags passed to echo weren't supported by /bin/sh
No description provided.