vfs: check userland buffers before reading them.
[haiku.git] / src / system / libroot / posix / unistd / pipe.c
blob1c851bf58c48ecbf7fa9e18b89b8fe7e1f3c9e4e
1 /*
2 * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
6 #include <errno.h>
7 #include <unistd.h>
9 #include <errno_private.h>
10 #include <syscalls.h>
13 int
14 pipe(int streams[2])
16 status_t error = _kern_create_pipe(streams);
17 if (error != B_OK) {
18 __set_errno(error);
19 return -1;
22 return 0;