Skip to content
This repository was archived by the owner on May 4, 2018. It is now read-only.

unix: don't abort if mutex init fails#1524

Open
LinuxJedi wants to merge 2 commits intojoyent:v1.xfrom
LinuxJedi:graceful_mutex_init
Open

unix: don't abort if mutex init fails#1524
LinuxJedi wants to merge 2 commits intojoyent:v1.xfrom
LinuxJedi:graceful_mutex_init

Conversation

@LinuxJedi
Copy link
Copy Markdown

Instead of SIGABRT when mutex init fails gracefully return an error code
and cleanup.

Related to pull request #1522

Instead of SIGABRT when mutex init fails gracefully return an error code
and cleanup.
@saghul
Copy link
Copy Markdown
Contributor

saghul commented Oct 9, 2014

Please drop braces for single statement conditionals.

@LinuxJedi
Copy link
Copy Markdown
Author

sorry, every other project I work on requires them due to things like the Apple double-goto SSL bug :)

Has been fixed

Comment thread src/unix/thread.c
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return -... instead.

@saghul
Copy link
Copy Markdown
Contributor

saghul commented Oct 13, 2014

The whole mutex / semaphore / condvar code is filled with aborts, I'd rather handle them all in a single go than have some functions abort and some return proper errors. As a result, some APIs might need to return int, since now they return void.

@LinuxJedi
Copy link
Copy Markdown
Author

hmm... so maybe I should abandon this until a 2.x version?

@saghul
Copy link
Copy Markdown
Contributor

saghul commented Oct 13, 2014

Just send the PR against master, work on it, and we'll merge it when ready. No rush :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants