mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-11 02:19:30 +00:00
Merge pull request #6870 from Znarf64/raise_signal_on_child_crash
Raise child process error signal if `odin run` child gets terminated.
This commit is contained in:
@@ -206,6 +206,9 @@ int run_subprocess(const char *name, const char **args) {
|
||||
if (WIFEXITED(status)) {
|
||||
return WEXITSTATUS(status);
|
||||
} else if (WIFSIGNALED(status)) {
|
||||
struct rlimit limit = { 0, 0, };
|
||||
setrlimit(RLIMIT_CORE, &limit);
|
||||
raise(WTERMSIG(status));
|
||||
return -1;
|
||||
} else if (WIFSTOPPED(status)) {
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user