From 6bd6a7cf271190ef8c88d3234c5e05ae9bf2cf91 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 12 Jan 1999 23:52:50 +0000 Subject: [PATCH] Report exit status of pthread_create() --- servers/slapd/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/servers/slapd/main.c b/servers/slapd/main.c index ea321d8981..4b12eca0cf 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -200,10 +200,11 @@ main( int argc, char **argv ) time( &starttime ); - if ( pthread_create( &listener_tid, NULL, slapd_daemon, - (void *) port ) != 0 ) { + if ( status = pthread_create( &listener_tid, NULL, + slapd_daemon, (void *) port ) != 0 ) + { Debug( LDAP_DEBUG_ANY, - "listener pthread_create failed\n", 0, 0, 0 ); + "listener pthread_create failed (%d)\n", status, 0, 0 ); exit( 1 ); } -- 2.39.5