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

Use nanosleep(2) instead of usleep(3) #652

Merged
merged 3 commits into from
May 15, 2024

Conversation

alanzhao1
Copy link

usleep(3) was declared obsolete in POSIX.1-2001 and removed in POSIX.1-2008 and nanosleep(2) was recommended to be used instead.

usleep(3) was declared obsolete in POSIX.1-2001 and removed in
POSIX.1-2008 and nanosleep(2) was recommended to be used instead.
code/autoupdater/autoupdater.c Outdated Show resolved Hide resolved
code/sys/sys_unix.c Show resolved Hide resolved
@alanzhao1
Copy link
Author

@zturtleman - could you please take a look and approve/merge if this looks good? (I don't have permissions to add reviewers to PRs in this repo.)

code/sys/sys_unix.c Outdated Show resolved Hide resolved
@zturtleman zturtleman merged commit aecf3f5 into ioquake:main May 15, 2024
3 checks passed
@alanzhao1 alanzhao1 deleted the bugfix/remove-usleep branch May 15, 2024 22:19
@zturtleman
Copy link
Member

Thanks.

This only affects the Unix-like dedicated server without a TTY and no map loaded (non-interactive server that fatal errored?) and the unused autoupdater. I tested the code path on macOS 10.6 (and 10.5 ppc binaries) and Debian 12 that it works and has similar CPU usage.

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.

None yet

4 participants