Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run the command for i in *.log; do cat "$i" | sort; done | more, the pipeline gets a SIGTTIN signal and is stopped.

bash$ for i in *.log; do cat "$i" | sort; done | more
### (one screenful of output...)
### (press Space)
[1]+  Stopped                 for i in *.log;
    cat "$i" | sort;
done | more
bash$ echo $?
149     # indicates SIGTTIN(21)

(I substituted a simple cat for a more elaborate and complex awk script.)

I don't see why a SIGTTIN is generated, as no process reads from tty, except more, which is not in the background. Can someone explain what's going on here?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.