serval-dna/nacl/nacl-20110221/curvecp/open_pipe.c
Daniel O'Connor bf9710fd5a Unpacked nacl-20110221 after processing by nacl-prepare-sources.
This only affects build_android, if nacl-gcc-prep is run then build/`uname -s` will be created.
2012-02-27 12:40:14 +10:30

16 lines
248 B
C

#include <unistd.h>
#include <fcntl.h>
#include "open.h"
#include "blocking.h"
int open_pipe(int *fd)
{
int i;
if (pipe(fd) == -1) return -1;
for (i = 0;i < 2;++i) {
fcntl(fd[i],F_SETFD,1);
blocking_disable(fd[i]);
}
return 0;
}