mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-11 02:19:30 +00:00
Raise child process error signal if odin run child gets terminated.
Previously one would get a nice `$ pid segmentation fault (core dumped) odin run .` message, but this behaviour was (probably unintentionally) removed in #6848.
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