[coyotos-dev] Behavior of exit()?
Jonathan S. Shapiro
shap at eros-os.com
Thu May 15 09:03:49 CDT 2008
We have a standards problem with exit().
The C standard specifies that exit() accepts an int. This is effectively
specified in two places:
1. In the specification of exit() within the C standard library
2. In the fact that main() is specified to return int, and this
return value is eventually passed to exit().
Passing the return value of main() to exit() is not a C library
requirement, but it is certainly a requirement of POSIX, and
it has become the de facto means of returning a successful process
exit result.
There are several issues concerning exit() that need to be resolved in
Coyotos:
1. How should exit() be handled? Is it an exception? If it is a
"process exit status", where is this exit status delivered?
Who gets the notification?
2. Do we want to have a coyotos variant of exit that exits with
a result code?
shap
More information about the coyotos-dev
mailing list