[comp.unix.shell] Stopped

forget@pluton (Yves Forget) (03/03/91)

Could someone please explain me why jobs I execute in background stop
with the message you see on the subject line ?

Thank you


-- 
=======================================================================
Yves Forget                    forget at terre.dmi.usherb.ca (Internet)
Universite de Sherbrooke       bo05   at udesvm.bitnet (bitnet address)

jik@athena.mit.edu (Jonathan I. Kamens) (03/04/91)

In article <1991Mar2.215641.10509@DMI.USherb.CA>, forget@pluton (Yves Forget) writes:
|> Could someone please explain me why jobs I execute in background stop
|> with the message you see on the subject line ?

  From the man page tty(4):

     When using the new terminal driver with the LTOSTOP bit set
     in the local modes, a process is prohibited from writing on
     its control terminal if it is not in the distinguished pro-
     cess group for that terminal.  Processes which are blocking
     or ignoring SIGTTOU signals or which are in the middle of a
     vfork(2) are excepted and allowed to produce output.

  In other words, certain processes don't want their output to go to the
terminal unless they're controlling the terminal.  For example, processes that
use curses don't want to be writing to the terminal if they're running in the
background.  Processes of this sort set the LTOSTOP bit in their terminal
modes, telling the kernel to automatically send them a signal which (by
default) stops them if they try to write to the terminal and they're not
currently controlling it.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710

michaelp@dadla.WR.TEK.COM (Michael Prusynski) (03/06/91)

In article <1991Mar2.215641.10509@DMI.USherb.CA>, forget@pluton (Yves Forget) writes:
> Could someone please explain me why jobs I execute in background stop
> with the message you see on the subject line ?


You probably have "stty tostop" set in your login file (.login or .profile),
or else it's the default.  Anyway put "stty -tostop" in your login file,
and read the man page on stty for more detailed info.

-----
Michael Prusynski (michaelp@dadla.WR.TEK.COM)   Phone: (503) 629-3062
USMail:  Tektronix Inc., MS 92-304, PO Box 4600, Beaverton, OR 97076    __o
  UUCP:  ...!uunet!tektronix!dadla.WR.TEK.COM!michaelp                 -\<,
  ARPA:  @RELAY.CS.NET:michaelp@dadla.WR.TEK.COM                  ....O/ O