| ... | @@ -826,7 +826,9 @@ static Error os_exec_process_posix(ZigList<const char *> &args, | ... | @@ -826,7 +826,9 @@ static Error os_exec_process_posix(ZigList<const char *> &args, |
| 826 | if (errno == ENOENT) { | 826 | if (errno == ENOENT) { |
| 827 | report_err = ErrorFileNotFound; | 827 | report_err = ErrorFileNotFound; |
| 828 | } | 828 | } |
| 829 | write(err_pipe[1], &report_err, sizeof(Error)); | 829 | if (write(err_pipe[1], &report_err, sizeof(Error)) == -1) { |
| | 830 | zig_panic("write failed"); |
| | 831 | } |
| 830 | exit(1); | 832 | exit(1); |
| 831 | } else { | 833 | } else { |
| 832 | // parent | 834 | // parent |
| ... | @@ -851,9 +853,13 @@ static Error os_exec_process_posix(ZigList<const char *> &args, | ... | @@ -851,9 +853,13 @@ static Error os_exec_process_posix(ZigList<const char *> &args, |
| 851 | if (err2) return err2; | 853 | if (err2) return err2; |
| 852 | | 854 | |
| 853 | Error child_err = ErrorNone; | 855 | Error child_err = ErrorNone; |
| 854 | write(err_pipe[1], &child_err, sizeof(Error)); | 856 | if (write(err_pipe[1], &child_err, sizeof(Error)) == -1) { |
| | 857 | zig_panic("write failed"); |
| | 858 | } |
| 855 | close(err_pipe[1]); | 859 | close(err_pipe[1]); |
| 856 | read(err_pipe[0], &child_err, sizeof(Error)); | 860 | if (read(err_pipe[0], &child_err, sizeof(Error)) == -1) { |
| | 861 | zig_panic("write failed"); |
| | 862 | } |
| 857 | close(err_pipe[0]); | 863 | close(err_pipe[0]); |
| 858 | return child_err; | 864 | return child_err; |
| 859 | } | 865 | } |