fixed err() implementation, exit(eval) according to spec

This commit is contained in:
git@daemon.de
2015-10-15 13:13:44 +02:00
parent 359be6bce7
commit 0c5ab80654

View File

@@ -32,6 +32,12 @@ void err(int eval, const char *fmt, ...) {
} }
fprintf(stderr, ": %s\n", strerror(errno)); fprintf(stderr, ": %s\n", strerror(errno));
va_end(ap); va_end(ap);
/* from the FreeBSD err() manpage:
The err(), verr(), errc(), verrc(), errx(), and verrx() functions do not
return, but exit with the value of the argument eval.
*/
exit(eval);
} }
#endif #endif