mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
Use safe nix
API instead of libc
(#12315)
# Description Where possible, this PR replaces usages of raw `libc` bindings to instead use safe interfaces from the `nix` crate. Where not possible, the `libc` version reexported through `nix` was used instead of having a separate `libc` dependency.
This commit is contained in:
@ -120,7 +120,7 @@ mod foreground_pgroup {
|
||||
/// Currently only intended to access `tcsetpgrp` and `tcgetpgrp` with the I/O safe `nix`
|
||||
/// interface.
|
||||
pub unsafe fn stdin_fd() -> impl AsFd {
|
||||
unsafe { BorrowedFd::borrow_raw(libc::STDIN_FILENO) }
|
||||
unsafe { BorrowedFd::borrow_raw(nix::libc::STDIN_FILENO) }
|
||||
}
|
||||
|
||||
pub fn prepare_command(external_command: &mut Command, existing_pgrp: u32) {
|
||||
|
Reference in New Issue
Block a user