pidstatus (status, stdout, ", failed");
}
return (status == 0 ? 0 : -1);
- } else {
- /*
- * Ruthlessly kill the child and anything
- * else in its process group.
- */
- killpg(child_id, SIGKILL);
- if (verbose)
- verbose_printf (", timed-out; terminated\n");
- return -1;
}
+ /*
+ * Ruthlessly kill the child and anything
+ * else in its process group.
+ */
+ killpg(child_id, SIGKILL);
+ if (verbose)
+ verbose_printf (", timed-out; terminated\n");
+ return -1;
}
}
* and massage the headers. Save
* a copy of the "From " line for later.
*/
- i = LEN("From ");
while (fgets (buffer, sizeof(buffer), qfp)) {
if (first) {
first = 0;
- if (!strncmp (buffer, "From ", i)) {
+ if (HasPrefix(buffer, "From ")) {
/* get copy of envelope information ("From " line) */
envelope = mh_xstrdup(buffer);
va_list ap;
va_start(ap, fmt);
- vfprintf (stdout, fmt, ap);
+ vprintf(fmt, ap);
va_end(ap);
fflush (stdout); /* now flush output */
char *s;
eindex = errno; /* save the errno */
- fprintf (stdout, ", ");
+ printf(", ");
va_start(ap, fmt);
- vfprintf (stdout, fmt, ap);
+ vprintf(fmt, ap);
va_end(ap);
if (what) {
if (*what)
- fprintf (stdout, " %s: ", what);
+ printf(" %s: ", what);
if ((s = strerror (eindex)))
- fprintf (stdout, "%s", s);
+ fputs(s, stdout);
else
- fprintf (stdout, "Error %d", eindex);
+ printf("Error %d", eindex);
}
- fputc ('\n', stdout);
+ putchar('\n');
fflush (stdout);
}