1 /* abandon.c - shell backend abandon function */
22 struct shellinfo *si = (struct shellinfo *) be->be_private;
27 /* no abandon command defined - just kill the process handling it */
28 if ( si->si_abandon == NULL ) {
29 pthread_mutex_lock( &conn->c_opsmutex );
31 for ( o = conn->c_ops; o != NULL; o = o->o_next ) {
32 if ( o->o_msgid == msgid ) {
33 pid = (pid_t) o->o_private;
37 pthread_mutex_unlock( &conn->c_opsmutex );
40 Debug( LDAP_DEBUG_ARGS, "shell killing pid %d\n", pid,
44 Debug( LDAP_DEBUG_ARGS, "shell could not find op %d\n",
50 if ( forkandexec( si->si_abandon, &rfp, &wfp ) == -1 ) {
54 /* write out the request to the abandon process */
55 fprintf( wfp, "ABANDON\n" );
56 fprintf( wfp, "msgid: %d\n", msgid );
57 print_suffixes( wfp, be );
60 /* no result from abandon */