SIGINT for force exit, SIGSTOP for graceful exit

This commit is contained in:
luwenpeng
2024-08-27 19:37:00 +08:00
parent 79e70f7145
commit 7e04992aa0
3 changed files with 16 additions and 26 deletions

View File

@@ -277,7 +277,7 @@ erro_out:
usleep(1000); // 1ms
}
PACKET_IO_LOG_FATAL("dumpfile io thread exit");
PACKET_IO_LOG_FATAL("dumpfile io thread exit (read_pcap_files: %lu, read_pcap_pkts: %lu)", handle->read_pcap_files, ATOMIC_READ(&handle->read_pcap_pkts));
ATOMIC_SET(&handle->io_thread_is_runing, 0);
return NULL;
@@ -335,8 +335,6 @@ void dumpfile_io_free(struct dumpfile_io *handle)
usleep(1000);
}
PACKET_IO_LOG_FATAL("dumpfile io thread read pcap files %lu, read pcap pkts %lu", handle->read_pcap_files, ATOMIC_READ(&handle->read_pcap_pkts));
struct pcap_pkt *pcap_pkt = NULL;
for (uint16_t i = 0; i < handle->nr_threads; i++)
{