Skip to content

Add getppid to std.c and std.os.linux. - #20866

Merged
andrewrk merged 1 commit into
ziglang:masterfrom
jcollie:getppid
Aug 7, 2024
Merged

Add getppid to std.c and std.os.linux.#20866
andrewrk merged 1 commit into
ziglang:masterfrom
jcollie:getppid

Conversation

@jcollie

@jcollie jcollie commented Jul 29, 2024

Copy link
Copy Markdown

The std lib is missing getppid, this patch adds it.

The std lib is missing getppid, this patch adds it.
Comment thread lib/std/c.zig
pub extern "c" fn if_nametoindex([*:0]const u8) c_int;

pub extern "c" fn getpid() pid_t;
pub extern "c" fn getppid() pid_t;

@alexrp alexrp Jul 30, 2024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note that this doesn't exist on Windows.

I think it's "fine" in that it's no worse than many of the other declarations immediately surrounding it. Just noting that at some point we need to go through and change these declarations to be in line with the principles laid out in #20679. I don't think this necessarily has to block merging this PR, since that conversion work will likely be done in a batched fashion anyway.

@andrewrk
andrewrk merged commit 979fd12 into ziglang:master Aug 7, 2024
@andrewrk

andrewrk commented Aug 7, 2024

Copy link
Copy Markdown
Member

Thanks!

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.

4 participants