#include "portable.h"
-#include <ac/stdlib.h>
-
#include <stdio.h>
+#include <sys/stat.h>
+#include <ac/stdlib.h>
#include "slurp.h"
#include "globals.h"
* Detach from the controlling terminal
* unless the -d flag is given or in one-shot mode.
*/
+#ifndef HAVE_WINSOCK
if ( ! (sglob->no_detach || sglob->one_shot_mode) )
lutil_detach( 0, 0 );
+#endif
/*
* Start the main file manager thread (in fm.c).
if ( ldap_pvt_thread_create( &(sglob->fm_tid),
0, fm, (void *) NULL ) != 0 )
{
+#ifdef NEW_LOGGING
+ LDAP_LOG ( SLURPD, ERR,
+ "main: file manager ldap_pvt_thread_create failed\n" , 0, 0, 0 );
+#else
Debug( LDAP_DEBUG_ANY, "file manager ldap_pvt_thread_create failed\n",
0, 0, 0 );
+#endif
exit( EXIT_FAILURE );
}
/* destroy the thread package */
ldap_pvt_thread_destroy();
+#ifdef NEW_LOGGING
+ LDAP_LOG ( SLURPD, RESULTS, "main: slurpd terminated\n", 0, 0, 0 );
+#else
Debug( LDAP_DEBUG_ANY, "slurpd: terminated.\n", 0, 0, 0 );
+#endif
return 0;
#endif /* !NO_THREADS */
}