home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 12.5 System Overloaded? Try Stopping Some Jobs Chapter 12
Job Control
Next: 12.7 Stop Background Output with stty tostop
 

12.6 Notification When Jobs Change State

Normally, the shell tells you about changes to your background jobs whenever it prints its prompt. That is, when you do something that makes the shell give you a prompt, you'll get a message like:

[1]  + Stopped (tty input)   rm -r
%

This message tells you that the rm -r command, which you're running in the background, needs input; it has probably asked you whether or not to delete a read-only file, or something similar.

This default behavior is usually what you want. By waiting until it prints a prompt, the shell minimizes "damage" to your screen. If you want to be notified immediately when a job changes state, you should set the variable notify :

% set notify

   ...C shell


$ set -o notify

   ...bash

The drawback, of course, is that you may be analyzing a screenful of output that you've laboriously constructed, only to have that screen "destroyed" by a lot of messages from the shell. Therefore, most users prefer to leave notify off (unset ). To stop all background output, use stty tostop (12.7 ) .

- ML


Previous: 12.5 System Overloaded? Try Stopping Some Jobs UNIX Power Tools Next: 12.7 Stop Background Output with stty tostop
12.5 System Overloaded? Try Stopping Some Jobs Book Index 12.7 Stop Background Output with stty tostop

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System