add exitcode

This commit is contained in:
rsc 2006-02-12 19:40:55 +00:00
parent 5cc53af92d
commit eadb18a335
3 changed files with 7 additions and 4 deletions

View file

@ -376,6 +376,7 @@ extern int dec16(uchar*, int, char*, int);
extern int enc16(char*, int, uchar*, int);
extern int encodefmt(Fmt*);
extern int dirmodefmt(Fmt*);
extern int exitcode(char*);
extern void exits(char*);
extern double frexp(double, int*);
extern ulong getcallerpc(void*);

View file

@ -4,7 +4,7 @@
void
_exits(char *s)
{
if(s && *s)
_exit(1);
_exit(0);
if(s == 0 || *s == 0)
_exit(0);
_exit(exitcode(s));
}

View file

@ -50,5 +50,7 @@ exits(char *s)
onex[i].f = 0;
(*f)();
}
exit(s && *s ? 1 : 0);
if(s == 0 || *s == 0)
exit(0);
exit(exitcode(s));
}