Skip to content

Commit

Permalink
suppress an incorrect error message in grind
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Morris committed Nov 19, 2020
1 parent 231c08d commit 6e3f75c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions user/grind.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,15 @@ go(int which_child)
close(aa[0]);
close(aa[1]);
close(bb[1]);
char buf[3] = { 0, 0, 0 };
char buf[4] = { 0, 0, 0, 0 };
read(bb[0], buf+0, 1);
read(bb[0], buf+1, 1);
read(bb[0], buf+2, 1);
close(bb[0]);
int st1, st2;
wait(&st1);
wait(&st2);
if(st1 != 0 || st2 != 0 || strcmp(buf, "hi") != 0){
if(st1 != 0 || st2 != 0 || strcmp(buf, "hi\n") != 0){
printf("grind: exec pipeline failed %d %d \"%s\"\n", st1, st2, buf);
exit(1);
}
Expand Down

0 comments on commit 6e3f75c

Please sign in to comment.