/* sys_pipe() is the normal C calling standard for creating a pipe. It's not the way Unix traditionally does this, though.  */
SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags)
/* sys_pipe() is the normal C calling standard for creating a pipe. It's not the way Unix traditionally does this, though.  */
SYSCALL_DEFINE2(pipe2, int __user *, fildes, int, flags)
{
	int fd[2];
	int error;
	error = do_pipe_flags(fd, flags);
	if (!error) {
		if (copy_to_user(fildes, fd, sizeof(fd))) {
			sys_close(fd[0]);
			sys_close(fd[1]);
			error = -EFAULT;
		}
	}
	return error;
}