It is fair assumption messages an user is asking to be wrote will be
attempted to be wrote as hard as possible.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
#include <netdb.h>
#include <getopt.h>
+#include "all-io.h"
#include "c.h"
#include "closestream.h"
#include "nls.h"
snprintf(buf, sizeof(buf), "<%d>%.15s %.200s%s: %.400s",
pri, tp, cp, pid, msg);
- if (write(fd, buf, strlen(buf)+1) < 0)
- return; /* error */
+ if (write_all(fd, buf, strlen(buf)+1) < 0)
+ warn(_("write failed"));
}
}