mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 00:41:15 -03:00
committed by
Johannes Altmanninger
parent
c5e4fed021
commit
c0bb0d6584
@@ -13,6 +13,7 @@
|
||||
use crate::signal::SigChecker;
|
||||
use crate::topic_monitor::Topic;
|
||||
use errno::errno;
|
||||
use fish_util::write_to_fd;
|
||||
use fish_wcstringutil::{join_strings, str2bytes_callback, wcs2bytes, wcs2osstring, wcs2zstring};
|
||||
use fish_widestring::{IntoCharIter, L, WExt as _, WString, wstr};
|
||||
use nix::unistd::AccessFlags;
|
||||
@@ -351,10 +352,6 @@ pub fn wrename(old_name: &wstr, new_name: &wstr) -> io::Result<()> {
|
||||
fs::rename(old_narrow, new_narrow)
|
||||
}
|
||||
|
||||
pub fn write_to_fd(input: &[u8], fd: RawFd) -> nix::Result<usize> {
|
||||
nix::unistd::write(unsafe { BorrowedFd::borrow_raw(fd) }, input)
|
||||
}
|
||||
|
||||
/// Write a wide string to a file descriptor. This avoids doing any additional allocation.
|
||||
/// Returns nothing when interrupted by ctrl-c or HUP.
|
||||
pub fn unescape_bytes_and_write_to_fd(input: impl IntoCharIter, fd: RawFd) -> Option<usize> {
|
||||
|
||||
Reference in New Issue
Block a user