Patch pipe2 (#364)

This commit is contained in:
hanjiezhou
2023-09-13 00:58:01 +08:00
committed by GitHub
parent 68312d3c68
commit 22c9db312a
8 changed files with 147 additions and 31 deletions

View File

@ -74,6 +74,15 @@ int pipe(int fd[2])
{
return (int)syscall_invoke(SYS_PIPE, fd, 0, 0, 0, 0, 0, 0, 0);
}
/**
* @brief 调用带参数的匿名管道
*
* @return int 如果失败返回负数
*/
int pipe2(int fd[2], int flags)
{
return (int)syscall_invoke(SYS_PIPE, fd, flags, 0, 0, 0, 0, 0, 0);
}
/**
* @brief fork当前进程但是与父进程共享VM、flags、fd
*