Added cleanup

This commit is contained in:
ceriel 1988-04-19 10:13:41 +00:00
parent da872ef789
commit cac49c513c
5 changed files with 9 additions and 6 deletions

View file

@ -0,0 +1,3 @@
_cleanup()
{
}

View file

@ -1,10 +1,8 @@
#include "lib.h"
PUBLIC int (*__cleanup)();
PUBLIC int exit(status)
int status;
{
if (__cleanup) (*__cleanup)();
_cleanup();
return callm1(MM, EXIT, status, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
}

View file

@ -15,6 +15,7 @@ dup.c
dup2.c
exec.c
exit.c
cleanup.c
fork.c
fstat.c
getegid.c

View file

@ -0,0 +1,3 @@
_cleanup()
{
}

View file

@ -1,10 +1,8 @@
#include "lib.h"
PUBLIC int (*__cleanup)();
PUBLIC int exit(status)
int status;
{
if (__cleanup) (*__cleanup)();
_cleanup();
return callm1(MM, EXIT, status, 0, 0, NIL_PTR, NIL_PTR, NIL_PTR);
}