You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#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.%ld", (long) getpid()); |
|
(void) DO( creat(filename, 0) ); |
|
(void) DO( unlink(filename) ); |
|
return 0; |
|
}
|
|
|