Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!wuarchive!uunet!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!mouse From: mouse@thunder.mcrcim.mcgill.edu (der Mouse) Newsgroups: comp.unix.questions Subject: Re: tty blocked in background job Message-ID: <1991Jun1.195940.25681@thunder.mcrcim.mcgill.edu> Date: 1 Jun 91 19:59:40 GMT References: <1991May29.054939.11898@csc.canberra.edu.au> Organization: McGill Research Centre for Intelligent Machines Lines: 29 In article <1991May29.054939.11898@csc.canberra.edu.au>, rvp@softserver.canberra.edu.au (Rey Paulo) writes: > Whenever a job is run int the background and the job happens to write > to the tty from which it was run, the message "tty blocked" occurs. Odd, which system and shell is this? I don't know that message. > This causes the job to be suspended. Is there any way that a > background job's access to the tty not blocked? You don't say what your system is. I'll describe BSD, simply because that's the original breeding ground of background jobs and SIGTTOU.... There is a bit in the tty settings that controls this. At the user level, this is controlled with "stty tostop" and "stty -tostop". At the ioctl level, this is the LTOSTOP bit in the local mode word (the thing manipulated with TIOCL{BIS,BIC,SET,GET}). There are also some special cases, which may or may not be implemented the same way in your system: if the process has SIGTTOU (the generated signal) blocked or ignored, or if the process is a child process running in its parent's memory during a vfork(), the output is permitted and no SIGTTOU is generated. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu