Skip to content
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

unistd: Add pause(2) #336

Merged
merged 2 commits into from
Mar 30, 2016
Merged

unistd: Add pause(2) #336

merged 2 commits into from
Mar 30, 2016

Conversation

kamalmarhubi
Copy link
Member

No description provided.

@kamalmarhubi
Copy link
Member Author

This one is weird because if it ever returns, the return value will be Err(EINTR).

@kamalmarhubi
Copy link
Member Author

RETURN VALUE

Since pause() suspends thread execution indefinitely unless interrupted by a signal, there is no successful completion return value. A value of -1 is returned and errno is set to indicate the error.

ERRORS

The pause() function will fail if:

[EINTR]
A signal is caught by the calling process and control is returned from the signal-catching function.

http://pubs.opengroup.org/onlinepubs/007908799/xsh/pause.html

Replace a busy loop with a call to `pause(2)`.
@fiveop
Copy link
Contributor

fiveop commented Mar 30, 2016

@homu r+

@homu
Copy link
Contributor

homu commented Mar 30, 2016

📌 Commit 507dfaf has been approved by fiveop

@homu
Copy link
Contributor

homu commented Mar 30, 2016

⚡ Test exempted - status

@homu homu merged commit 507dfaf into nix-rust:master Mar 30, 2016
homu added a commit that referenced this pull request Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants