[Pkg-openldap-devel] r1359 - openldap/trunk/debian/patches

matthijs at alioth.debian.org matthijs at alioth.debian.org
Tue Mar 29 06:55:17 UTC 2011


Author: matthijs
Date: 2011-03-29 06:55:16 +0000 (Tue, 29 Mar 2011)
New Revision: 1359

Modified:
   openldap/trunk/debian/patches/service-operational-before-detach
Log:
 * Update the patch with one more commit from upstream (cvs commit 1.279)


Modified: openldap/trunk/debian/patches/service-operational-before-detach
===================================================================
--- openldap/trunk/debian/patches/service-operational-before-detach	2011-03-28 20:17:36 UTC (rev 1358)
+++ openldap/trunk/debian/patches/service-operational-before-detach	2011-03-29 06:55:16 UTC (rev 1359)
@@ -73,39 +73,43 @@
  		rc = 1;
  		SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 20 );
  		goto destroy;
-@@ -903,7 +906,24 @@
+@@ -903,7 +906,26 @@
  #endif
  
  #ifndef HAVE_WINSOCK
 -	lutil_detach( no_detach, 0 );
-+	if ( lutil_pair( waitfds ) < 0 ) {
-+		Debug( LDAP_DEBUG_ANY,
-+				"main: lutil_pair failed: %d\n",
-+				0, 0, 0 );
-+		rc = 1;
-+		goto destroy;
++	if ( !no_detach ) {
++		if ( lutil_pair( waitfds ) < 0 ) {
++			Debug( LDAP_DEBUG_ANY,
++					"main: lutil_pair failed: %d\n",
++					0, 0, 0 );
++			rc = 1;
++			goto destroy;
++		}
++		pid = lutil_detach( no_detach, 0 );
++		if ( pid ) {
++			char buf[4];
++			rc = EXIT_SUCCESS;
++			close( waitfds[1] );
++			if ( read( waitfds[0], buf, 1 ) != 1 )
++				rc = EXIT_FAILURE;
++			_exit( rc );
++		} else {
++			close( waitfds[0] );
++		}
 +	}
-+	pid = lutil_detach( no_detach, 0 );
-+	if ( pid ) {
-+		char buf[4];
-+		rc = EXIT_SUCCESS;
-+		close( waitfds[1] );
-+		if ( read( waitfds[0], buf, 1 ) != 1 )
-+			rc = EXIT_FAILURE;
-+		_exit( rc );
-+	} else {
-+		close( waitfds[0] );
-+	}
  #endif /* HAVE_WINSOCK */
  
  #ifdef CSRIMALLOC
-@@ -974,6 +994,11 @@
+@@ -974,6 +996,13 @@
  
  	Debug( LDAP_DEBUG_ANY, "slapd starting\n", 0, 0, 0 );
  
 +#ifndef HAVE_WINSOCK
-+	write( waitfds[1], "1", 1 );
-+	close( waitfds[1] );
++	if ( !no_detach ) {
++		write( waitfds[1], "1", 1 );
++		close( waitfds[1] );
++	}
 +#endif
 +
  #ifdef HAVE_NT_EVENT_LOG




More information about the Pkg-openldap-devel mailing list