X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fserver.c;h=893a864c4f816919129913c310f1a6c82309527c;hb=996f400a876d5b3c99f0783bea2f6e4253c1fa12;hp=6cf05fa1991be80b7ddb0d995d0cb35453b56d75;hpb=aeb7c171a08d06ae366d752061a8e8f1b14beb08;p=awesomized%2Flibmemcached diff --git a/libtest/server.c b/libtest/server.c index 6cf05fa1..893a864c 100644 --- 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;