Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P6011
Test for pipe2
Active
Public
Actions
Authored by
awight
on Sep 15 2017, 1:05 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Tags
None
Referenced Files
F9543839: Test for pipe2
Sep 15 2017, 1:05 AM
2017-09-15 01:05:48 (UTC+0)
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".
Event Timeline
awight
created this paste.
Sep 15 2017, 1:05 AM
2017-09-15 01:05:48 (UTC+0)
awight
mentioned this in
T174402: Review and fix file handle management in worker and celery processes
.
Sep 15 2017, 1:54 AM
2017-09-15 01:54:19 (UTC+0)
Log In to Comment