The operating system is responsible for communication between processes and has different mechanisms to exchange information. These processes are unidirectional, such as exit codes, signals, and pipes, or bidirectional, such as sockets.
Process communications
Exit codes
Applications communicate their result to the operating system by returning a value called exit status. This is an integer value passed to the parent process when the process ends. A list of common exit codes can be found in the /usr/include/sysexits.h file, as shown here:
#define EX_OK 0 /* successful termination */
#define EX__BASE 64 /* base value for error messages */
#define EX_USAGE 64 /* command line usage error */
#define EX_DATAERR 65 /...