Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Dec 1997 08:54:48 -0500 (EST)
From:      "Adrian T. Filipi-Martin" <atf3r@cs.virginia.edu>
To:        Abc Xyz <un_x@hotmail.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: ctrl-Z / &
Message-ID:  <Pine.SOL.3.96.971216084621.15557A-100000@mamba.cs.Virginia.EDU>
In-Reply-To: <34961A4F.41C67EA6@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 15 Dec 1997, Abc Xyz wrote:

> can i know beforehand whether or not a process
> will "stop" (as opposed to continuing to process)
> when thrown into the background, or suspended
> with ctrl-Z?  are there rules that determine this?
> 
> it apears some programs run, and some don't.
> and i think some used to, and now don't (ping).

	A backgrounded proccess will always be stopped if it tries to read
from the controlling terminal.  Whether it is stopped when it attempts to
write output depends upon the "tostop" tty flag.  If you see the man page
for stty(1) you will see that setting tostop will cause the program to be
sent a SIGTTOU to the process and the default behavior of the signal is to
stop the process.  If you set -tostop, then the process will ignore the
SIGTTOU, write the the tty and continue as if nothing had happened.

	-tostop should be the default setting.

	Adrian
--
adrian@virginia.edu        ---->>>>| If I were stranded on a desert island, and
System Administrator         --->>>| I could only have one OS for my computer,
Neurosurgical Visualzation Lab -->>| it would be FreeBSD.  Think about it.....
http://www.nvl.virginia.edu/     ->|      http://www.freebsd.org/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.3.96.971216084621.15557A-100000>