Page MenuHomePhabricator
Paste P6011

Test for pipe2
ActivePublic

Authored by awight on Sep 15 2017, 1:05 AM.
Tags
None
Referenced Files
F9543839: Test for pipe2
Sep 15 2017, 1:05 AM
Subscribers
None
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, const char** argv) {
int fds[2];
int res;
res = pipe2(fds, O_CLOEXEC);
printf("%d %d %d\n", res, fds[0], fds[1]);
}
// Should print "0 3 4".