mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-12 10:06:47 +00:00
parent
821bb9a2dc
commit
4da3758acf
@ -41,8 +41,9 @@ impl Syscall {
|
|||||||
) -> Result<usize, SystemError> {
|
) -> Result<usize, SystemError> {
|
||||||
let ret = unsafe { c_sys_wait4(pid, wstatus, options, rusage) };
|
let ret = unsafe { c_sys_wait4(pid, wstatus, options, rusage) };
|
||||||
if (ret as isize) < 0 {
|
if (ret as isize) < 0 {
|
||||||
return Err(SystemError::from_posix_errno(-(ret as isize) as i32)
|
return Err(
|
||||||
.expect("wait4: Invalid errno"));
|
SystemError::from_posix_errno((ret as isize) as i32).expect("wait4: Invalid errno")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return Ok(ret as usize);
|
return Ok(ret as usize);
|
||||||
}
|
}
|
||||||
|
@ -120,6 +120,12 @@ int rm(const char * path);
|
|||||||
*/
|
*/
|
||||||
void swab(void *restrict src, void *restrict dest, ssize_t nbytes);
|
void swab(void *restrict src, void *restrict dest, ssize_t nbytes);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 创建pipe
|
||||||
|
* @param fildes 分别是读端fildes[0]和写端fildes[1]
|
||||||
|
*/
|
||||||
|
int pipe(int fildes[2]);
|
||||||
|
|
||||||
pid_t getpid(void);
|
pid_t getpid(void);
|
||||||
|
|
||||||
int dup(int fd);
|
int dup(int fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user