Skip to content

Conversation

@Franklin-Qi
Copy link
Contributor

Use rustix instead of libc and unsafe functions such as getpgrp, getsid, flock, gettid, getppid, getpgid, and getsid.

Closes: #595

@sylvestre
Copy link
Contributor

clippy is sad

@Franklin-Qi
Copy link
Contributor Author

clippy is sad

Thanks, it compiles successfully on Ubuntu. It seems to be a multi-system compatibility issue. I'm currently modifying the check error.

@Krysztal112233
Copy link
Collaborator

failed tests has nothing to do with you; you can just blame about the complexity of SYSTEM DEVELOPMEN. XD

these tests have now been successfully completed.

@Franklin-Qi Franklin-Qi force-pushed the remove-libc-in-pgrep branch 2 times, most recently from b34da15 to 53516e6 Compare February 10, 2026 06:31
Use rustix instead of libc and unsafe functions such as getpgrp, getsid, flock, gettid, getppid, getpgid, and getsid.
@@ -445,17 +429,32 @@ pub fn grp2gid(_name: &str) -> io::Result<u32> {
/// # Safety
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this function is no longer unsafe, the Safety comment is useless now.

}
}

/// # Safety
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

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.

Remove libc in pgrep

4 participants