Fix the mkfifo call on Linux and add a test to avoid regression

This commit is contained in:
Xavier L'Heureux
2019-09-13 12:35:08 -04:00
parent 4f2a93ea90
commit 30d3cd5c88
5 changed files with 42 additions and 1 deletions
+1 -1
View File
@@ -287,7 +287,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(