8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 06:03:02 +01:00

Better way to delete pidfile, thanks to Claudio

This commit is contained in:
alexpeshkoff 2006-04-18 08:56:34 +00:00
parent 9e23d61b99
commit d88aaa5b92

View File

@ -15,7 +15,7 @@
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
* $Id: guard.cpp,v 1.8.12.2 2006-04-16 15:29:20 asfernandes Exp $
* $Id: guard.cpp,v 1.8.12.3 2006-04-18 08:56:34 alexpeshkoff Exp $
*/
/* contains the main() and not shared routines for ibguard */
@ -39,10 +39,6 @@
#include <errno.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "../jrd/common.h"
#include "../jrd/divorce.h"
#include "../jrd/isc_proto.h"
@ -228,11 +224,9 @@ int CLIB_ROUTINE main( int argc, char **argv)
}
} while (!done);
#ifdef HAVE_UNISTD_H
if (pidfilename) {
unlink(pidfilename);
remove(pidfilename);
}
#endif
UTIL_ex_unlock(fd_guard);
exit(0);
} /* main */