char *sandbox = NULL;
#endif
#ifdef LOG_LOCAL4
- int syslogUser = DEFAULT_SYSLOG_USER;
+ int syslogUser = DEFAULT_SYSLOG_USER;
#endif
int g_argc = argc;
char **g_argv = argv;
- char *configfile = NULL;
- char *configdir = NULL;
- char *serverName;
- int serverMode = SLAP_SERVER_MODE;
+ char *configfile = NULL;
+ char *configdir = NULL;
+ char *serverName;
+ int serverMode = SLAP_SERVER_MODE;
struct sync_cookie *scp = NULL;
struct sync_cookie *scp_entry = NULL;
- char *serverNamePrefix = "";
+ char *serverNamePrefix = "";
size_t l;
+ int slapd_pid_file_unlink = 0, slapd_args_file_unlink = 0;
+
#ifdef CSRIMALLOC
FILE *leakfile;
if( ( leakfile = fopen( "slapd.leak", "w" )) == NULL ) {
rc = 1;
goto destroy;
}
-
fprintf( fp, "%d\n", (int) getpid() );
fclose( fp );
+ slapd_pid_file_unlink = 1;
}
if ( slapd_args_file != NULL ) {
}
fprintf( fp, "\n" );
fclose( fp );
+ slapd_args_file_unlink = 1;
}
/*
ldap_pvt_tls_destroy();
#endif
- if ( slapd_pid_file != NULL ) {
+ if ( slapd_pid_file_unlink ) {
unlink( slapd_pid_file );
}
- if ( slapd_args_file != NULL ) {
+ if ( slapd_args_file_unlink ) {
unlink( slapd_args_file );
}