Skip to content

[libc][wait] add comment about __W_CONTINUED value #125934

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

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

nickdesaulniers
Copy link
Member

No description provided.

@nickdesaulniers nickdesaulniers requested a review from lntue February 5, 2025 21:15
@llvmbot llvmbot added the libc label Feb 5, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 5, 2025

@llvm/pr-subscribers-libc

Author: Nick Desaulniers (nickdesaulniers)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/125934.diff

1 Files Affected:

  • (modified) libc/src/sys/wait/wait4Impl.h (+2)
diff --git a/libc/src/sys/wait/wait4Impl.h b/libc/src/sys/wait/wait4Impl.h
index ec84eee491de24..f2bdeb02f8668d 100644
--- a/libc/src/sys/wait/wait4Impl.h
+++ b/libc/src/sys/wait/wait4Impl.h
@@ -65,6 +65,8 @@ LIBC_INLINE ErrorOr<pid_t> wait4impl(pid_t pid, int *wait_status, int options,
       *wait_status = W_STOPCODE(info.si_status);
       break;
     case CLD_CONTINUED:
+      // Set wait_status to a value that the caller can check via WIFCONTINUED.
+      // glibc has a non-POSIX macro definition __W_CONTINUED for this value.
       *wait_status = 0xffff;
       break;
     default:

@nickdesaulniers nickdesaulniers merged commit 718b16a into llvm:main Feb 5, 2025
13 of 15 checks passed
@nickdesaulniers nickdesaulniers deleted the wait_riscv32_2 branch February 5, 2025 21:43
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants