exit with erno+1, because otherwise exit status is 0 with array bound error

This commit is contained in:
ceriel 1994-11-14 11:51:24 +00:00
parent e441b2f658
commit e10145ba2e
2 changed files with 3 additions and 3 deletions

View file

@ -88,12 +88,12 @@ catch(trapno)
signal(__signo, SIG_DFL);
_cleanup();
kill(getpid(), __signo);
_exit(trapno);
_exit(trapno+1);
}
#endif
if (trapno != M2_FORCH) {
_cleanup();
_exit(trapno);
_exit(trapno+1);
}
SIG(catch);
}

View file

@ -148,7 +148,7 @@ _catch(erno) unsigned erno; {
if (_write(2,q,(int)(p-q)) < 0)
;
}
_exit(erno);
_exit(erno+1);
error:
_trp(erno);
}