projects
/
m6w6
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
e0da0f9
)
Clean up file descriptors that we were leaving on the floor.
author
Brian Aker
<brian@tangent.org>
Tue, 5 Apr 2011 21:02:02 +0000
(14:02 -0700)
committer
Brian Aker
<brian@tangent.org>
Tue, 5 Apr 2011 21:02:02 +0000
(14:02 -0700)
libtest/server.c
patch
|
blob
|
history
diff --git
a/libtest/server.c
b/libtest/server.c
index 6cf05fa1991be80b7ddb0d995d0cb35453b56d75..893a864c4f816919129913c310f1a6c82309527c 100644
(file)
--- a/
libtest/server.c
+++ b/
libtest/server.c
@@
-121,11
+121,13
@@
void server_startup(server_startup_st *construct)
int status;
snprintf(construct->pid_file[x], FILENAME_MAX, "/tmp/memcached.pidXXXXXX");
- if (mkstemp(construct->pid_file[x]) == -1)
+ int fd;
+ if ((fd= mkstemp(construct->pid_file[x])) == -1)
{
perror("mkstemp");
return;
}
+ close(fd);
{
char *var;