#include <stdio.h>
#include <stdlib.h>
+#include <ac/signal.h>
#include <ac/socket.h>
#include <ac/string.h>
#include <ac/ctype.h>
identity = MAIL500;
}
+#ifdef SIGPIPE
+ (void) SIGNAL( SIGPIPE, SIG_IGN );
+#endif
+
#ifdef LOG_MAIL
openlog( myname, OPENLOG_OPTIONS, LOG_MAIL );
#else
exit( -1 );
}
+#ifdef SIGPIPE
+ (void) SIGNAL( SIGPIPE, SIG_IGN );
+#endif
+
if ( (ld = ldap_open( ldaphost, 0 )) == NULL ) {
perror( "ldap_open" );
exit( -1 );
else
myname = strdup( myname + 1 );
+#ifdef SIGPIPE
+ (void) SIGNAL( SIGPIPE, SIG_IGN );
+#endif
+
if ( dosyslog ) {
#ifdef LOG_LOCAL4
openlog( myname, OPENLOG_OPTIONS, LOG_LOCAL4 );
lber_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &debug);
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &debug);
}
-
+
+#ifdef SIGPIPE
+ (void) SIGNAL( SIGPIPE, SIG_IGN );
+#endif
+
if ( dosyslog ) {
#ifdef LOG_LOCAL3
openlog( myname, OPENLOG_OPTIONS, LOG_LOCAL3 );
else
myname = strdup( myname + 1 );
-
if ( debug ) {
lber_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &debug);
ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, &debug);
}
+#ifdef SIGPIPE
+ (void) SIGNAL( SIGPIPE, SIG_IGN );
+#endif
+
if ( dosyslog ) {
#ifdef LOG_LOCAL3
openlog( myname, OPENLOG_OPTIONS, LOG_LOCAL3 );
#include <stdlib.h>
#include <ac/ctype.h>
+#include <ac/signal.h>
#include <ac/string.h>
#include <ac/syslog.h>
#include <ac/time.h>
else
myname = strdup( myname + 1 );
+#ifdef SIGPIPE
+ (void) SIGNAL( SIGPIPE, SIG_IGN );
+#endif
+
#ifdef LOG_MAIL
openlog( myname, OPENLOG_OPTIONS, LOG_MAIL );
#else
#include <stdlib.h>
#include <ac/ctype.h>
+#include <ac/signal.h>
#include <ac/string.h>
#include <ac/syslog.h>
#include <ac/unistd.h>
exit( 1 );
}
+#ifdef SIGPIPE
+ (void) SIGNAL( SIGPIPE, SIG_IGN );
+#endif
+
if ( dosyslog ) {
/*
* if syslogging requested, initialize
#include <stdlib.h>
#include <ctype.h>
+#include <ac/signal.h>
#include <ac/string.h>
#include <ac/unistd.h>
ldap_set_option( NULL, LDAP_OPT_DEBUG_LEVEL, &debug );
}
+#ifdef SIGPIPE
+ (void) SIGNAL( SIGPIPE, SIG_IGN );
+#endif
+
if (( ld = ldap_open( ldaphost, ldapport )) == NULL ) {
perror( "ldap_open" );
exit( 1 );
#include <stdlib.h>
#include <ac/ctype.h>
+#include <ac/signal.h>
#include <ac/string.h>
#include <ac/unistd.h>
ldif_debug = debug;
}
+#ifdef SIGPIPE
+ (void) SIGNAL( SIGPIPE, SIG_IGN );
+#endif
+
if ( !not ) {
if (( ld = ldap_open( ldaphost, ldapport )) == NULL ) {
perror( "ldap_open" );
#include <stdlib.h>
#include <ac/ctype.h>
+#include <ac/signal.h>
#include <ac/string.h>
#include <ac/unistd.h>
ldap_set_option( NULL, LDAP_OPT_DEBUG_LEVEL, &debug );
}
+#ifdef SIGPIPE
+ (void) SIGNAL( SIGPIPE, SIG_IGN );
+#endif
+
if (( ld = ldap_open( ldaphost, ldapport )) == NULL ) {
perror( "ldap_open" );
exit( 1 );
#include <stdlib.h>
#include <sys/time.h>
+#include <ac/signal.h>
#include <ac/string.h>
#include <ac/unistd.h>
ldap_set_option( NULL, LDAP_OPT_DEBUG_LEVEL, &debug );
}
+#ifdef SIGPIPE
+ (void) SIGNAL( SIGPIPE, SIG_IGN );
+#endif
+
/* connect to server */
if ((ld = ldap_open (ldaphost, ldapport)) == NULL)
{
#include <stdlib.h>
#include <ac/ctype.h>
+#include <ac/signal.h>
#include <ac/string.h>
#include <ac/unistd.h>
ldif_debug = debug;
}
+#ifdef SIGPIPE
+ (void) SIGNAL( SIGPIPE, SIG_IGN );
+#endif
+
if (( ld = ldap_open( ldaphost, ldapport )) == NULL ) {
perror( ldaphost );
exit( 1 );
printf(Version);
fflush( stdout );
+#ifdef SIGPIPE
+ (void) SIGNAL (SIGPIPE, SIG_IGN);
+#endif
+
initialize_client();
initialize_attribute_strings();