repo.or.cz
/
haiku.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
vfs: check userland buffers before reading them.
[haiku.git]
/
src
/
system
/
libroot
/
posix
/
unistd
/
pipe.c
blob
1c851bf58c48ecbf7fa9e18b89b8fe7e1f3c9e4e
1
/*
2
* Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de. All rights reserved.
3
* Distributed under the terms of the MIT License.
4
*/
5
6
#include <errno.h>
7
#include <unistd.h>
8
9
#include <errno_private.h>
10
#include <syscalls.h>
11
12
13
int
14
pipe
(
int
streams
[
2
])
15
{
16
status_t error
=
_kern_create_pipe
(
streams
);
17
if
(
error
!=
B_OK
) {
18
__set_errno
(
error
);
19
return
-
1
;
20
}
21
22
return
0
;
23
}