ref: 5c41fd94d8c8e9e5bd30060e5a2323e84788b5eb
parent: 5fddb5fd3bc85da5b1387c6b5fac656916943c82
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Fri Nov 4 17:02:50 EDT 2022
cc: wait for cpp to report whether it was a success
--- a/sys/src/cmd/cc/lex.c
+++ b/sys/src/cmd/cc/lex.c
@@ -180,7 +180,7 @@
compile(char *file, char **defs, int ndef)
{
char *ofile, *p, **av;
- int i, c, fd[2];
+ int i, c, fd[2], status;
static int first = 1;
ofile = strdup(file);
@@ -300,6 +300,8 @@
yyparse();
if(!debug['a'] && !debug['Z'])
gclean();
+ if(mywait(&status) > 0 && status != 0)
+ nerrors++;
return nerrors;
}
--
⑨