-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[merp] Fix return value handling of posix_spawn #10823
Conversation
mono/utils/mono-merp.c
Outdated
// // FIXME error handling | ||
if (status == 0) | ||
g_error ("Could not start merp\n"); | ||
g_assertf (status == 0, "Could not start merp\n"); |
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.
g_assertf (status == 0, "Could not start merp (%d)\n", status);
?
g_assertf (status == 0, "posix_spawn(/usr/bin/open %s) failed with status:%d\n", config.merpGUIPath, status);
?
Granted, if things are bad, formating of the assert message is risky; it requires heap. The way to handle that is do allocations/formats in startup, leaving as little work as possible for the error path. And heap-free putting in the status.
5b2eaa5
to
cb0cf74
Compare
It seems the 2018-02 backport was merged. I'm not going to revert that. I will close and update my updated error formatting to the 2018-04 and 2018-06 PRs. |
@monojenkins backport 2018-06 |
@monojenkins backport 2018-04 |
@monojenkins build failed |
It was missing the format arguments that were in a later iteration of #10823
@monojenkins backport 2018-08 |
Commit migrated from mono/mono@a7d355d
@slluis requested this change be merged by tomorrow to make a release window