repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
drd/tests/swapcontext: Improve the portability of this test further
[valgrind.git]
/
none
/
tests
/
fdleak_creat.c
blob
3c7c40174d88e91b66667ce1af5e4da4d0ab88e2
1
#include <unistd.h>
2
#include <stdio.h>
3
#include <fcntl.h>
4
#include
"fdleak.h"
5
6
int
main
(
int
argc
,
char
**
argv
)
7
{
8
char
filename
[
24
];
9
10
CLOSE_INHERITED_FDS
;
11
12
sprintf
(
filename
,
"/tmp/file.%ld"
, (
long
)
getpid
());
13
(
void
)
DO
(
creat
(
filename
,
0
) );
14
(
void
)
DO
(
unlink
(
filename
) );
15
return
0
;
16
}