diff options
Diffstat (limited to 'platform/src/packet_adapter.cpp')
| -rw-r--r-- | platform/src/packet_adapter.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/platform/src/packet_adapter.cpp b/platform/src/packet_adapter.cpp index 6c83e19..5739a09 100644 --- a/platform/src/packet_adapter.cpp +++ b/platform/src/packet_adapter.cpp @@ -33,7 +33,6 @@ struct thread struct runtime_ctx { - int enable_debug; int need_stop; struct metrics metrics; @@ -92,16 +91,6 @@ error_out: static void signal_handler(int signo) { - if (signo == SIGUSR1) - { - runtime->enable_debug = 1; - LOG_ERROR("%s: received SIGUSR1, enable debug", LOG_MAIN); - } - if (signo == SIGUSR2) - { - runtime->enable_debug = 0; - LOG_ERROR("%s: received SIGUSR2, disable debug", LOG_MAIN); - } if (signo == SIGHUP) { LOG_RELOAD(); @@ -130,9 +119,6 @@ static void usage(char *cmd) fprintf(stderr, " -v -- show version\n"); fprintf(stderr, " -d -- run daemon\n"); fprintf(stderr, " -h -- show help\n"); - fprintf(stderr, "Signal: \n"); - fprintf(stderr, " kill -s SIGUSR1 `pidof %s` -- enable debug\n", cmd); - fprintf(stderr, " kill -s SIGUSR2 `pidof %s` -- disable debug\n", cmd); } int main(int argc, char **argv) @@ -164,16 +150,6 @@ int main(int argc, char **argv) LOG_ERROR("%s: TSG Packet Adapter Engine, Version: %s Start ...", LOG_MAIN, Packet_Adapter_Version); - if (signal(SIGUSR1, signal_handler) == SIG_ERR) - { - LOG_ERROR("%s: failed at signal(SIGUSR1), %d: %s", LOG_MAIN, errno, strerror(errno)); - goto error; - } - if (signal(SIGUSR2, signal_handler) == SIG_ERR) - { - LOG_ERROR("%s: failed at signal(SIGUSR2), %d: %s", LOG_MAIN, errno, strerror(errno)); - goto error; - } if (signal(SIGHUP, signal_handler) == SIG_ERR) { LOG_ERROR("%s: failed at signal(SIGHUP), %d: %s", LOG_MAIN, errno, strerror(errno)); |
