mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
add exitcode
This commit is contained in:
parent
5cc53af92d
commit
eadb18a335
3 changed files with 7 additions and 4 deletions
|
@ -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*);
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue