mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-21 01:42:18 +00:00
Remove respawn_on_crash behaviour, we aren't using or testing it
This commit is contained in:
parent
342572730b
commit
ca9faeef9b
@ -331,7 +331,6 @@ END_STRUCT
|
||||
STRUCT(server)
|
||||
STRING(256, chdir, "/", absolute_path,, "Absolute path of chdir(2) for server process")
|
||||
STRING(256, interface_path, "", str_nonempty,, "Path of directory containing interface files, either absolute or relative to instance directory")
|
||||
ATOM(bool_t, respawn_on_crash, 0, boolean,, "If true, server will exec(2) itself on fatal signals, eg SEGV")
|
||||
ATOM(uint32_t, config_reload_interval_ms, 1000, uint32_nonzero,, "Time interval between configuration reload polls, in milliseconds")
|
||||
SUB_STRUCT(watchdog, watchdog,)
|
||||
STRING(120, motd, "", str_nonempty,, "Message Of The Day displayed on HTTPD root page")
|
||||
|
2
main.c
2
main.c
@ -44,7 +44,6 @@ int main(int argc, char **argv)
|
||||
signal(SIGIO,sigIoHandler);
|
||||
|
||||
srandomdev();
|
||||
server_save_argv(argc, (const char*const*)argv);
|
||||
cf_init();
|
||||
int status = parseCommandLine(NULL, argv[0], argc - 1, (const char*const*)&argv[1]);
|
||||
#if defined WIN32
|
||||
@ -61,7 +60,6 @@ static void crash_handler(int signal)
|
||||
LOGF(LOG_LEVEL_FATAL, "The following clue may help: %s", crash_handler_clue);
|
||||
dump_stack(LOG_LEVEL_FATAL);
|
||||
BACKTRACE;
|
||||
serverRespawn();
|
||||
// Now die of the same signal, so that our exit status reflects the cause.
|
||||
INFOF("Re-sending signal %d to self", signal);
|
||||
kill(getpid(), signal);
|
||||
|
1
serval.h
1
serval.h
@ -234,7 +234,6 @@ int server_check_stopfile();
|
||||
void server_watchdog(struct sched_ent *alarm);
|
||||
void overlay_mdp_clean_socket_files();
|
||||
void serverCleanUp();
|
||||
void serverRespawn();
|
||||
|
||||
int overlay_forward_payload(struct overlay_frame *f);
|
||||
int packetOkOverlay(struct overlay_interface *interface,unsigned char *packet, size_t len,
|
||||
|
32
server.c
32
server.c
@ -38,10 +38,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
static char pidfile_path[256];
|
||||
|
||||
#define EXEC_NARGS 20
|
||||
char *exec_args[EXEC_NARGS + 1];
|
||||
unsigned exec_argc = 0;
|
||||
|
||||
int servalShutdown = 0;
|
||||
|
||||
static int server_getpid = 0;
|
||||
@ -90,14 +86,6 @@ const char *_server_pidfile_path(struct __sourceloc __whence)
|
||||
return pidfile_path;
|
||||
}
|
||||
|
||||
void server_save_argv(int argc, const char *const *argv)
|
||||
{
|
||||
/* Save our argv[] to use for relaunching */
|
||||
for (exec_argc = 0; exec_argc < (unsigned)argc && exec_argc < EXEC_NARGS; ++exec_argc)
|
||||
exec_args[exec_argc] = strdup(argv[exec_argc]);
|
||||
exec_args[exec_argc] = NULL;
|
||||
}
|
||||
|
||||
int server()
|
||||
{
|
||||
IN();
|
||||
@ -404,26 +392,6 @@ void serverCleanUp()
|
||||
server_remove_stopfile();
|
||||
}
|
||||
|
||||
void serverRespawn()
|
||||
{
|
||||
if (serverMode && config.server.respawn_on_crash) {
|
||||
unsigned i;
|
||||
overlay_interface_close_all();
|
||||
char execpath[160];
|
||||
if (get_self_executable_path(execpath, sizeof execpath) != -1) {
|
||||
strbuf b = strbuf_alloca(1024);
|
||||
for (i = 0; i < exec_argc; ++i)
|
||||
strbuf_append_shell_quotemeta(strbuf_puts(b, i ? " " : ""), exec_args[i]);
|
||||
INFOF("Respawning %s as %s", execpath, strbuf_str(b));
|
||||
execv(execpath, exec_args);
|
||||
/* Quit if the exec() fails */
|
||||
WHY_perror("execv");
|
||||
} else {
|
||||
WHY("Cannot respawn");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void signal_handler(int signal)
|
||||
{
|
||||
switch (signal) {
|
||||
|
@ -44,7 +44,6 @@ configure_servald_server() {
|
||||
set debug.httpd on \
|
||||
set debug.rhizome_tx on \
|
||||
set debug.rhizome_rx on \
|
||||
set server.respawn_on_crash off \
|
||||
set mdp.iftype.wifi.tick_ms 500
|
||||
}
|
||||
|
||||
|
@ -46,7 +46,6 @@ default_config() {
|
||||
set debug.rhizome_ads on \
|
||||
set debug.rhizome_tx on \
|
||||
set debug.rhizome_rx on \
|
||||
set server.respawn_on_crash off \
|
||||
set mdp.iftype.wifi.tick_ms 500
|
||||
}
|
||||
|
||||
|
@ -43,8 +43,7 @@ configure_servald_server() {
|
||||
set debug.rhizome off \
|
||||
set debug.httpd off \
|
||||
set debug.rhizome_tx off \
|
||||
set debug.rhizome_rx off \
|
||||
set server.respawn_on_crash off
|
||||
set debug.rhizome_rx off
|
||||
}
|
||||
|
||||
doc_StressRhizomeTransfer="Five nodes each sharing 26 bundles from 0B to 620K"
|
||||
@ -140,7 +139,6 @@ setup_StressRhizomeDirect() {
|
||||
set debug.httpd off \
|
||||
set debug.rhizome_tx off \
|
||||
set debug.rhizome_rx off \
|
||||
set server.respawn_on_crash off \
|
||||
set mdp.iftype.wifi.tick_ms 500
|
||||
local sidvar="SID$instance_name"
|
||||
for ((n = 0; n < $files_per_instance; ++n)); do
|
||||
|
Loading…
x
Reference in New Issue
Block a user