Skip to content
Snippets Groups Projects
Commit e55387b0 authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Fixed signal handling mismatch in knotc.

parent eab36584
No related branches found
No related tags found
No related merge requests found
......@@ -98,6 +98,8 @@ int exec_cmd(const char *argv[], int argc)
}
/* Execute command. */
fflush(stdout);
fflush(stderr);
execvp(args[0], args);
/* Execute failed. */
......@@ -114,7 +116,11 @@ int exec_cmd(const char *argv[], int argc)
/* Wait for finish. */
int ret = 0;
sigset_t newset;
sigfillset(&newset);
sigprocmask(SIG_BLOCK, &newset, 0);
waitpid(chproc, &ret, 0);
sigprocmask(SIG_UNBLOCK, &newset, 0);
return ret;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment