Skip to content

[libc] Revise the definition of posix_spawn. #124686

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
Jan 28, 2025
Merged

[libc] Revise the definition of posix_spawn. #124686

merged 1 commit into from
Jan 28, 2025

Conversation

c8ef
Copy link
Contributor

@c8ef c8ef commented Jan 28, 2025

Closes #124635.

Some parameter types in the definition of posix_spawn currently do not match the standard. This patch resolves the issue.
ref: https://man7.org/linux/man-pages/man3/posix_spawn.3.html

@c8ef c8ef changed the title Draft [libc] Revise the definition of posix_spawn. Jan 28, 2025
@c8ef c8ef marked this pull request as ready for review January 28, 2025 03:50
@llvmbot llvmbot added the libc label Jan 28, 2025
@c8ef c8ef requested a review from nickdesaulniers January 28, 2025 03:50
@llvmbot
Copy link
Member

llvmbot commented Jan 28, 2025

@llvm/pr-subscribers-libc

Author: None (c8ef)

Changes

Closes #124635.

Some parameter types in the definition of posix_spawn currently do not match the standard. This patch resolves the issue.
ref: https://man7.org/linux/man-pages/man3/posix_spawn.3.html


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

1 Files Affected:

  • (modified) libc/include/spawn.yaml (+2-2)
diff --git a/libc/include/spawn.yaml b/libc/include/spawn.yaml
index e725ab9719eda4..c763cc76fd094f 100644
--- a/libc/include/spawn.yaml
+++ b/libc/include/spawn.yaml
@@ -18,8 +18,8 @@ functions:
       - type: const char *__restrict
       - type: posix_spawn_file_actions_t *
       - type: posix_spawnattr_t *__restrict
-      - type: const char *__restrict *
-      - type: const char *__restrict *
+      - type: char * const * __restrict
+      - type: char * const * __restrict
   - name: posix_spawn_file_actions_addclose
     standards:
       - POSIX

Copy link
Member

@nickdesaulniers nickdesaulniers left a comment

Choose a reason for hiding this comment

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

Thanks for the patch! Need us to merge this for you?

@c8ef c8ef merged commit 8ce0d05 into llvm:main Jan 28, 2025
18 checks passed
@c8ef c8ef deleted the spawn branch January 28, 2025 16:23
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.

[libc][spawn] wrong function signature for posix_spawn
3 participants