moonbridge

changeset 223:d544e8379691

Remove SIGUSR1 mechanism to terminate children gracefully (incomplete yet)
author jbe
date Tue Jun 23 14:47:51 2015 +0200 (2015-06-23)
parents bae067af56d4
children 828e2bca2e16
files moonbridge.c
line diff
     1.1 --- a/moonbridge.c	Tue Jun 23 02:38:00 2015 +0200
     1.2 +++ b/moonbridge.c	Tue Jun 23 14:47:51 2015 +0200
     1.3 @@ -335,7 +335,7 @@
     1.4    signal(SIGINT, moonbr_signal);
     1.5    signal(SIGTERM, moonbr_signal);
     1.6    signal(SIGCHLD, moonbr_signal);
     1.7 -  signal(SIGUSR1, moonbr_signal);
     1.8 +  /* signal(SIGUSR1, moonbr_signal); */  /* might be used to terminate children gracefully */
     1.9  }
    1.10  
    1.11  
    1.12 @@ -1143,6 +1143,8 @@
    1.13      }
    1.14    }
    1.15    moonbr_poll_shutdown();  /* avoids loops due to error condition when polling closed listeners */
    1.16 +  /* sending SIGUSR1 to children might be used to terminate children gracefully */
    1.17 +  /*
    1.18    {
    1.19      pid_t pgrp = getpgrp();
    1.20      moonbr_log(LOG_INFO, "Sending SIGUSR1 to all processes in group %i", (int)pgrp);
    1.21 @@ -1150,6 +1152,7 @@
    1.22        moonbr_log(LOG_WARNING, "Error while sending SIGUSR1 to own process group: %s", strerror(errno));
    1.23      }
    1.24    }
    1.25 +  */
    1.26  }
    1.27  
    1.28  
    1.29 @@ -2354,7 +2357,7 @@
    1.30        lua_setglobal(L, "listen");
    1.31      }
    1.32      lua_settop(L, 1);
    1.33 -    lua_gc(L, LUA_GCCOLLECT, 0);  // collect garbage before forking later
    1.34 +    lua_gc(L, LUA_GCCOLLECT, 0);  /* collect garbage before forking later */
    1.35      moonbr_run(L);
    1.36    }
    1.37    return 0;

Impressum / About Us