Merge remote-tracking branch 'origin/truncate-n-mkfifo'

This commit is contained in:
Jeremy Soller
2020-01-20 11:17:15 -07:00
11 changed files with 152 additions and 30 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ use core_io::Write;
use super::{errno, types::*, Pal};
use crate::{
c_str::CStr,
header::{dirent::dirent, signal::SIGCHLD},
header::{dirent::dirent, signal::SIGCHLD, sys_stat::S_IFIFO},
};
// use header::sys_resource::rusage;
use crate::header::{
@@ -292,7 +292,7 @@ impl Pal for Sys {
}
fn mkfifo(path: &CStr, mode: mode_t) -> c_int {
e(unsafe { syscall!(MKNODAT, AT_FDCWD, path.as_ptr(), mode, 0) }) as c_int
e(unsafe { syscall!(MKNODAT, AT_FDCWD, path.as_ptr(), mode | S_IFIFO, 0) }) as c_int
}
unsafe fn mmap(