Skip to content

Fix unreachable code warning and unsafe sleep in rlimits test - #13895

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl955675939
Open

Fix unreachable code warning and unsafe sleep in rlimits test#13895
copybara-service[bot] wants to merge 1 commit into
masterfrom
test/cl955675939

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Jul 29, 2026

Copy link
Copy Markdown

Fix unreachable code warning and unsafe sleep in rlimits test

The fork() loop in RLIMIT_NPROC tests previously used an infinite
while(1) { sleep(1); } loop followed by an unreachable _exit(1).
This caused a -Wunreachable-code warning. Additionally, invoking
sleep() immediately after a bare fork() can occasionally hang
when test frameworks are run with memory interceptors like TSan.

@copybara-service copybara-service Bot added the exported Issue was exported automatically label Jul 29, 2026
@copybara-service
copybara-service Bot force-pushed the test/cl955675939 branch 7 times, most recently from 70ad605 to c8fdd07 Compare July 31, 2026 00:57
The fork() loop in RLIMIT_NPROC tests previously used an infinite
while(1) { sleep(1); } loop followed by an unreachable _exit(1).
This caused a -Wunreachable-code warning. Additionally, invoking
sleep() immediately after a bare fork() can occasionally hang
when test frameworks are run with memory interceptors like TSan.

PiperOrigin-RevId: 955675939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant