O'Reilly logo

Mac OS X Panther in a Nutshell, 2nd Edition by Jason McIntosh, Chuck Toporek, Chris Stone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Process Management

Each command you invoke or program that you run from a Terminal window becomes a child of that terminal’s shell. The Terminal window can juggle many child processes at once, but only one at a time is brought to the foreground, writing its output (through the Unix standard output file handle) to the Terminal, and accepting keyboard input (via Unix standard input) from the user. Any other processes are either placed in the background—running but not displaying any interface or accepting input—or suspended (paused) in the process of execution.

You can control the application in the foreground by sending it Unix signals via the keystrokes listed in Table 18-1. Programs usually respond to them as listed, though individual programs may interpret them differently. (The Emacs text editor, for example, ties a text-searching function to the Control-S keystroke.)

Table 18-1. Foreground process control keystrokes

Keystroke

Description

Control-C

Sends an interrupt signal, which usually causes the program to exit.

Control-D

Sends an end-of-file signal. If a program is accepting multiple lines of input from you, this signals that you’re finished providing it.

Control-Z

Suspends the process in the foreground, and returns you to the command line.

Control-S

Suspends the process in the foreground, but keeps it in the foreground.

Control-Q

Resumes a suspended process, and brings it to the foreground.

Tip

Control-Q is a good keystroke to try if a Terminal window ceases ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required