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 13int 14pipe(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} 24