> As with exit(), it can be replaced automatically with exits() but you
> still have to figure out what message you want in your exits().
If anyone is interested, this is what I used as a compatibility shim:
#include <u.h>
#include <libc.h>
void
exit (int code) {
switch (code) {
case -1:
exits("FAILURE");
case 0:
exits(0);
default:
exits("Unknown condition");
}
}
One could instead print("%d", code), or print("FAILURE: %d", code).
Two cents, please!
++L
PS: I have a small compatibility library I seldom use. It has been
useful at times. The version on sources
(contrib/lucio/sys/src/pub/compat) looks a bit skinny, I may have lost
something along the way.