Call _cleanup before _exit

This commit is contained in:
ceriel 1991-03-15 09:24:03 +00:00
parent adab058c34
commit f4691c73c4
3 changed files with 8 additions and 5 deletions

View file

@ -71,6 +71,7 @@ _SYSTEM__NEWPROCESS(p, a, n, p1)
Just call the coroutine procedure.
*/
(*(curproc->proc))();
_cleanup();
_exit(0);
}
}

View file

@ -52,8 +52,6 @@ static struct errm {
{ -1, 0}
};
extern exit();
catch(trapno)
int trapno;
{
@ -93,11 +91,14 @@ catch(trapno)
signal(__signo, SIG_DFL);
_cleanup();
kill(getpid(), __signo);
exit(trapno);
_exit(trapno);
}
#endif
#endif
#endif
if (trapno != M2_FORCH) exit(trapno);
if (trapno != M2_FORCH) {
_cleanup();
_exit(trapno);
}
SIG(catch);
}

View file

@ -32,5 +32,6 @@ CallAtEnd(p)
halt()
{
exit(0);
_cleanup();
_exit(0);
}