优化退出流程,统一注册到on_exit(

This commit is contained in:
2025-09-29 16:07:11 +08:00
parent afe70e6d17
commit 8c52e4ba84
9 changed files with 163 additions and 41 deletions

View File

@ -3,6 +3,7 @@
#include <pthread.h>
#include "tools/log/log.h"
#include "interpreter/interpreter.h"
#define MAX_BUF 256
#define HISTORY_BUF 256
@ -17,8 +18,11 @@ typedef struct Ctl
char *history[HISTORY_BUF];
pthread_t logwathcher;
log_manager *logmanager;
ctx *command;//解释器上下文
}Ctl;
Ctl *init_tem(log_manager *logmanager);
int free_history(Ctl *self);
#endif