LX 132 VB 11
LX 132 VB 11
Foreground Processes
bash (wait)
ls -l
Foreground processes are invoked by simply typing a
command at the command line.
Background Processes
bash
ls -l &
Background processes are invoked by putting an "&" at
the end of the command line
Terminating Processes
Foreground process
ctrl-c Interrupt key, cancels a foreground
process. After the interrupt, the
system returns the prompt on the
screen
kill Sometimes the kill command is
used to terminate foreground
processes
Background process
kill The kill command is the only
way to terminate background
processes
Terminating Processes
$ ps -jf
PPID PID ... TTY STAT UID TIME COMMAND
122 374 ... 1 S 500 0:00 bash
374 569 ... 1 S 500 0:00 bash
569 572 ... 1 R 500 0:01 find /
569 575 ... 1 R 500 0:00 ps jf
$ kill 572
Signals
Signal Meaning
01 hangup - you logged out while the process
was still running (ctrl-d)
$ jobs
[1]+ Running ls -R / >out 2>out.error &
$ fg %1
ls -R / >out 2>out.error &
<ctrl-z>
[1]+ Stopped ls -R / >out 2>out.error &
$ bg 402 ; jobs
[1]+ Running ls -R / >out 2>out.error &
$ kill %ls
Daemons
print job 1
print job 2
print job 3
/dev/lp0
Checkpoint