Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
valgrind
/
0d2e58f427658a7322ca5a6a715bd33e8a2930b8
/
.
/
none
/
tests
/
fdleak_creat.c
blob: 7f3fd72e90735e4f654ed1788d6d92e63aff094b [
file
] [
log
] [
blame
]
#include
<unistd.h>
#include
<stdio.h>
#include
<fcntl.h>
#include
"fdleak.h"
int
main
(
int
argc
,
char
**
argv
)
{
char
filename
[
24
];
CLOSE_INHERITED_FDS
;
sprintf
(
filename
,
"/tmp/file.%d"
,
getpid
());
creat
(
filename
,
0
);
unlink
(
filename
);
return
0
;
}