What is the state of departure?
The status of the program output, also called the return code, is the number that the program passes on to the operating system, script, or other process that originally made it after starting. There are no real rules for what the numbers used as a state of departure mean, although the value of zero traditionally means that the program normally stepped out and any non -zero value means that the program unexpectedly ended. By assigning the number to the output status, the original program or process that calls the code can find out whether the program has successfully performed the necessary tasks or other actions need to be undertaken. There are situations in which the program can intentionally end in the middle of running, using a specific code of error that indicates that something is wrong, such as the missing data file or lack of computer memory. Programs that unspecified define the end code return zero to the call program if the operating system or language interpreter does not finish the program for errors.
The output status can also be used to communicate with a script or another process by handing out specific values that indicate what actions should be done. One example would be a script designed to keep the program in operation, despite the possible times when the program could stop maintenance. This scheme would work with a script performing the program and then waiting for it to end. Programmers could organize this so that the program returned one number to mean that it leaves permanently and should not be restarted, and another number could instruct the script to wait for a certain period of time and then restart the program; The third value could still indicate that the program will encounter an error and needs the attention of Programmer.
The use of the Ending Code for Communication is in certain situations in certain situations for security and other limits that have some programs in different operating systems. There are many cases whereIt is impossible for the program to communicate with its caller process or other parallel program in the same system. In these situations, communication options between programs would be limited to comprehensive schemes involving shared memory, network socket connection or writing files. Using the output status, simple information can be transmitted in a very basic way that does not require the development of its own frame.