Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
fp2-dev
/
platform
/
external
/
valgrind
/
ef1b9722dd0213d727a1cb1553ae43584572d2b2
/
.
/
none
/
tests
/
fdleak_fcntl.c
blob: 0a1f52d74af839c3ea9fbd60c17edf560dced14e [
file
] [
log
] [
blame
]
#include
<unistd.h>
#include
<stdio.h>
#include
<fcntl.h>
#include
"fdleak.h"
int
main
(
int
argc
,
char
**
argv
)
{
int
s1
;
CLOSE_INHERITED_FDS
;
s1
=
open
(
"/dev/null"
,
O_RDONLY
);
if
(
fcntl
(
s1
,
F_DUPFD
,
s1
)
==
-
1
)
perror
(
"fcntl"
);
return
0
;
}