1 /* abandon.c - shell backend abandon function */
6 #include <sys/socket.h>
19 struct shellinfo *si = (struct shellinfo *) be->be_private;
24 /* no abandon command defined - just kill the process handling it */
25 if ( si->si_abandon == NULL ) {
26 pthread_mutex_lock( &conn->c_opsmutex );
28 for ( o = conn->c_ops; o != NULL; o = o->o_next ) {
29 if ( o->o_msgid == msgid ) {
34 pthread_mutex_unlock( &conn->c_opsmutex );
37 Debug( LDAP_DEBUG_ARGS, "shell killing pid %d\n", pid,
41 Debug( LDAP_DEBUG_ARGS, "shell could not find op %d\n",
47 if ( forkandexec( si->si_abandon, &rfp, &wfp ) == -1 ) {
51 /* write out the request to the abandon process */
52 fprintf( wfp, "ABANDON\n" );
53 fprintf( wfp, "msgid: %d\n", msgid );
54 print_suffixes( wfp, be );
57 /* no result from abandon */