| ... | ... | @@ -826,7 +826,9 @@ static Error os_exec_process_posix(ZigList<const char *> &args, |
| 826 | 826 | if (errno == ENOENT) { |
| 827 | 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 | 832 | exit(1); |
| 831 | 833 | } else { |
| 832 | 834 | // parent |
| ... | ... | @@ -851,9 +853,13 @@ static Error os_exec_process_posix(ZigList<const char *> &args, |
| 851 | 853 | if (err2) return err2; |
| 852 | 854 | |
| 853 | 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 | 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 | 863 | close(err_pipe[0]); |
| 858 | 864 | return child_err; |
| 859 | 865 | } |