The UNIX standards, specifically IEEE Std 1003.1, 2004 Edition, defines a process as "an address space with one or more threads executing within that address space, and the required system resources for those threads." We can regard a process as just a program that is running.
Start a new process:
The system function runs the command passed to it as a string and waits for it to complete. The command is executed as if the command
$ sh -c string
has been given to a shell. system returns 127 if a shell can't be started to run the command and -1 if another error occurs. Otherwise, system returns the exit code of the command.
The UNIX standards, specifically IEEE Std 1003.1, 2004 Edition, defines a process as "an address space with one or more threads executing within that address space, and the required system resources for those threads." We can regard a process as just a program that is running.