Blob Blame Raw
--- xinetd-2.3.14/xinetd/access.c	2005-10-05 19:15:33.000000000 +0200
+++ xinetd-2.3.14-mod/xinetd/access.c	2012-03-05 14:54:30.935416926 +0100
@@ -73,6 +73,7 @@ static void cps_service_restart(void)
    unsigned int i;
    time_t nowtime;
    const char *func = "cps_service_restart";
+   int rs;
 
    nowtime = time(NULL);
    for( i=0; i < pset_count( SERVICES(ps) ); i++ ) {
@@ -84,8 +85,11 @@ static void cps_service_restart(void)
       if( SVC_STATE(sp) == SVC_DISABLED ) {
          scp = SVC_CONF( sp );
          if ( SC_TIME_REENABLE(scp) <= nowtime ) {
+            rs = SVC_RUNNING_SERVERS(sp);
             /* re-enable the service */
             if( svc_activate(sp) == OK ) {
+               /* remember running servers after restart */
+               SVC_RUNNING_SERVERS(sp) = rs;
                msg(LOG_ERR, func,
                "Activating service %s", SC_NAME(scp));
             } else {