fixed some bugs but still have a bug with exit from viewer mode

This commit is contained in:
Edward Emelianov
2023-05-06 14:37:24 +03:00
parent 543a5a5b38
commit aa8a3a30b1
7 changed files with 67 additions and 51 deletions

5
main.c
View File

@@ -40,7 +40,8 @@ static int isserver = FALSE;
static pid_t childpid = 0;
void signals(int signo){
if(signo) signal(signo, SIG_IGN);
//if(signo) signal(signo, SIG_IGN);
DBG("signo=%d", signo);
if(childpid){ // master process
if(signo == SIGUSR1){ // kill child
kill(childpid, signo);
@@ -62,8 +63,8 @@ void signals(int signo){
#ifdef IMAGEVIEW
DBG("KILL GL");
closeGL();
usleep(10000);
#endif
DBG("exit(%d)", signo);
exit(signo);
}