Quit parent process silently on background purge (improvement for SB #77974).
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 24 Jun 2011 15:12:56 +0000 (15:12 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 24 Jun 2011 15:12:56 +0000 (15:12 +0000)
org.glite.lb.server/src/lb_proto.c
org.glite.lbjp-common.server-bones/src/srvbones.c

index 247c369..ea5a8ff 100644 (file)
@@ -1073,7 +1073,7 @@ edg_wll_ErrorCode edg_wll_Proto(edg_wll_Context ctx,
                                                free(et);
                                                free(ed);
                                        } else {
-                                               glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_INFO, "Background purge done, %d jobs purged.", i - 1);
+                                               glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_INFO, "Background purge done successfully.");
                                        }
                                        *response = NULL;
                                        if (requestPTR) free(requestPTR);
index 8fcdcb8..dd41c39 100644 (file)
@@ -538,8 +538,11 @@ static int slave(slave_data_init_hnd data_init_hnd, int sock)
                                        srv = -1;
                                        glite_common_log(set_log_category, LOG_PRIORITY_DEBUG, "[%d] %s, connection closed",getpid(),strerror(rv));
                                        continue;
-                               }
-                               else if ( rv < 0 ) {
+                               } else if (rv == -EINPROGRESS) {
+                                       /*      background operation -> parent forked -> kill slave */
+                                       glite_common_log(set_log_category, LOG_PRIORITY_DEBUG, "[%d] terminating parent",getpid());
+                                       exit(0);
+                               } else if ( rv < 0 ) {
                                        /*      unknown error -> clasified as FATAL -> kill slave
                                         */
                                        glite_common_log(set_log_category, LOG_PRIORITY_INFO, "[%d] %s, terminating",getpid(),strerror(-rv));