Commit 851197f3 authored by Ronny Wichers Schreur's avatar Ronny Wichers Schreur 🏢
Browse files

Disable SIGALRM (timer events) during compilation. This will make the

CleanIDE less responsive, but at least it works under SysV signal
semantics (where signals during system calls make the system call fail).
parent e70ea6d9
......@@ -237,6 +237,9 @@ int call_caching_compiler (CleanCharArray args)
{
int r;
char result_string[RESULT_SIZE], *end;
void (*oldhandler)(int);
oldhandler = signal (SIGALRM, SIG_IGN);
log ("call_caching_compiler\n");
......@@ -250,6 +253,7 @@ int call_caching_compiler (CleanCharArray args)
if (fgets(result_string,RESULT_SIZE,compiler_results) == NULL){
perror ("clm: reading compiler result failed");
/* exit (1); */
(void) signal (SIGALRM, oldhandler);
return 0;
}
......@@ -261,5 +265,7 @@ int call_caching_compiler (CleanCharArray args)
/* FIXME, clm/CleanIDE don't correspond
return r>=0; */
(void) signal (SIGALRM, oldhandler);
return r;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment