The shell is a user-level ๐ผ Process that reads in commands to execute; this is the terminal we use to run stuff. The shell keeps track of jobsโcommands started interactivelyโthat can either be in the foreground or background. Each job is associated with a process group.
Session
A session is a collection of process groups either attached to a terminal or not attached to any terminal (daemonโs). Within a session, there are foreground and background processes.
Foreground jobs read from terminal input stdin
and also receive signals from the keyboard. Background jobs canโt read stdin
and will receive a signal if it tries to do so. Both types of jobs can write to stdout
.