tty blocked in background job

der Mouse mouse at thunder.mcrcim.mcgill.edu
Sun Jun 2 05:59:40 AEST 1991


In article <1991May29.054939.11898 at csc.canberra.edu.au>, rvp at 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 at larry.mcrcim.mcgill.edu



More information about the Comp.unix.questions mailing list