#include <regex.h>
#define GREATER(x,y) ( ((x) > (y)) ? (x) : (y) )
+#define WARN(x) fprintf(stderr, "%s:%d %s\n", __FILE__, __LINE__, x)
struct result {
int test; /* i.e. the number of the test */
int pipefd[2];
pid_t cpid;
FILE *tap;
- char *line;
+ char *line = 0;
ssize_t nread;
size_t len = 0;
int written = 0;
close(pipefd[1]);
/* parent continue on */
tap = fdopen(pipefd[0], "r");
+ if (tap == NULL) {
+ perror("tap is null:");
+ exit(EXIT_FAILURE);
+ }
} else {
tap = stdin;
}