优化退出信号传递流程

This commit is contained in:
2025-09-28 14:26:09 +08:00
parent a0ccc964bc
commit afe70e6d17
10 changed files with 48 additions and 7 deletions

View File

@ -5,7 +5,11 @@
#include <stddef.h>
#include <string.h>
#include <termios.h>
#include <pthread.h>
#include <signal.h>
#include "ctl.h"
#include "interpreter/interpreter.h"
#include "tools/log/log.h"
@ -248,6 +252,8 @@ int teml(Ctl *self,int fifo[2])
const char fexp[256] = {'\0'};
memcpy(&input,&fexp,MAX_BUF);
}while(command->statue == 0);
pthread_kill(self->logwathcher,SIGUSR1);
//关闭log定期清理程序
close(fifo[0]);
close(fifo[1]);
free_history(self);