Summary
In computing, the exit status, or exit code, of a terminated process is an integer number that is made available to its parent process (or caller). In DOS, this may be referred to as an errorlevel. When computer programs are executed, the operating system creates an abstract entity called a process in which the book-keeping for that program is maintained. In multitasking operating systems such as Unix or Linux, new processes can be created by active processes. The process that spawns another is called a parent process, while those created are child processes. Child processes run concurrently with the parent process. The technique of spawning child processes is used to delegate some work to a child process when there is no reason to stop the execution of the parent. When the child finishes executing, it exits by calling the exit system call. This system call facilitates passing the exit status code back to the parent, which can retrieve this value using the wait system call. The parent and the child can have an understanding about the meaning of the exit statuses. For example, it is common programming practice for a child process to return (exit with) zero to the parent signifying success. Apart from this return value from the child, other information like how the process exited, either normally or by a signal may also be available to the parent process. The specific set of codes returned is unique to the program that sets it. Typically it indicates success or failure. The value of the code returned by the function or program may indicate a specific cause of failure. On many systems, the higher the value, the more severe the cause of the error. Alternatively, each bit may indicate a different condition, with these being evaluated by the or operator together to give the final value; for example, fsck does this. Sometimes, if the codes are designed with this purpose in mind, they can be used directly as a branch index upon return to the initiating program to avoid additional tests.
About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.
Related courses (4)
CS-119(c): Information, Computation, Communication
L'objectif de ce cours est d'introduire les étudiants à la pensée algorithmique, de les familiariser avec les fondamentaux de l'Informatique et de développer une première compétence en programmation (
ME-213: Programmation pour ingénieur
Mettre en pratique les bases de la programmation vues au semestre précédent. Développer un logiciel structuré. Méthode de debug d'un logiciel. Introduction à la programmation scientifique. Introductio
CS-108: Practice of object-oriented programming
Les étudiants perfectionnent leurs connaissances en Java et les mettent en pratique en réalisant un projet de taille conséquente. Ils apprennent à utiliser et à mettre en œuvre les principaux types de
Show more
Related lectures (35)
Processes: Overview and Management
Covers the basics of processes in operating systems, including creation, memory layout, state transitions, virtualization, APIs, and program execution.
File Handling in C: Basics and Common Issues
Covers the basics of file handling in C, common issues, and standard functions.
Anonymity Online: Techniques and Weaknesses
Explores online anonymity techniques and weaknesses, including bypassing geo-blocking and avoiding tracking.
Show more
Related publications (8)

Almost Optimal Scaling of Reed-Muller Codes on BEC and BSC Channels

Rüdiger Urbanke, Seyed Hamed Hassani, Shrinivas Kudekar, Yury Polyanskiy

Consider a binary linear code of length N, minimum distance d(min), transmission over the binary erasure channel with parameter 0 < epsilon < 1 or the binary symmetric channel with parameter 0 < epsilon < 1/2, and block-MAP decoding. It was shown by Tillic ...
IEEE2018

Optical prism for creating multiple views of an image

Theo Lasser, Marcel Leutenegger, Stefan Geissbuehler

Optical prism comprising two external parallel and reflecting surfaces, one internal interface, parallel to said surfaces and acting as light splitter; said prism furthermore comprising an entrance side forming an angle β with respect to said interface and ...
2016

Wave-Like Solutions of General 1-D Spatially Coupled Systems

Rüdiger Urbanke, Shrinivas Kudekar

We establish the existence of wave-like solutions to spatially coupled graphical models which, in the large size limit, can be characterized by a 1-D real-valued state. This is extended to a proof of the threshold saturation phenomenon for all such models, ...
Ieee-Inst Electrical Electronics Engineers Inc2015
Show more
Related concepts (7)
Exit (system call)
On many computer operating systems, a computer process terminates its execution by making an exit system call. More generally, an exit in a multithreading environment means that a thread of execution has stopped running. For resource management, the operating system reclaims resources (memory, , etc.) that were used by the process. The process is said to be a dead process after it terminates. Under Unix and Unix-like operating systems, a process is started when its parent process executes a fork system call.
Exec (system call)
In computing, exec is a functionality of an operating system that runs an in the context of an already existing process, replacing the previous executable. This act is also referred to as an overlay. It is especially important in Unix-like systems, although it exists elsewhere. As no new process is created, the process identifier (PID) does not change, but the machine code, data, heap, and stack of the process are replaced by those of the new program.
Wait (system call)
In computer operating systems, a process (or task) may wait for another process to complete its execution. In most systems, a parent process can create an independently executing child process. The parent process may then issue a wait system call, which suspends the execution of the parent process while the child executes. When the child process terminates, it returns an exit status to the operating system, which is then returned to the waiting parent process. The parent process then resumes execution.
Show more