Talk:Exit (system call)
Latest comment: 5 years ago by Jiminy pop in topic add a Fortran example
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
|
Missing
editThis article still needs a few things:
- Back-links from other related articles. I've added back-links to most of the articles referenced in this article.
- A short clean example, similar to that in the fork article.
- Mention of operating systems that do not allow a process to specify an exit status.
- Discussion of how systems other than Unix/DOS/MacOS (e.g., embedded systems) handle program termination.
not OS
editThis article needs to be renamed, as exit is a (operating)system call, not an operating system. Ren ✉ 01:20, 14 June 2009 (UTC)
- Then the title for Fork (operating system) should also be changed for consistency. — Loadmaster (talk) 14:38, 14 September 2010 (UTC)
problem with Pascal example
editThe example code for Pascal does not compile as written (at least not with fpc
, nor any other compliant compiler).
The syntax for using exit
to exit the main program back to the OS is specifically different.
Perhaps the best documentation for the proper use can be found in the Free Pascal docs or in the Irie Pascal docs.
I recommend the code in the Pascal example be changed to
program wiki;
begin
ExitCode := 0;
exit
end.
add a Fortran example
editI recommend the following example be added:
program wiki
call exit(0)
end program wiki
With these columns, it is technically Fortran 90, although the syntax would otherwise be the same for Fortran 77. I recommend simply labelling it "Fortran."