Here is another example of the same behavior:
strace timeout 1 bash
strace, bash .
bash , .
--- SIGTTIN {si_signo = SIGTTIN, si_code = SI_USER, si_pid = 7162, si_uid = 1000} --- rt_sigaction (SIGTTIN, {sa_handler = SIG_IGN, sa_mask = [], sa_flags = SA_RESTORER, sa_restorer = 0x7f097723a7e0}, {sa_handler = SIG_DFL, sa_mask = [], sa_flags = SA_RESTORER, sa_restorer = 0x7f097723a7e0}, 8) = 0 ioctl (255, TIOCGPGRP, [6412])
= 0 rt_sigaction (SIGTTIN, {sa_handler = SIG_DFL, sa_mask = [], sa_flags = SA_RESTORER, sa_restorer = 0x7f097723a7e0}, {sa_handler = SIG_IGN, sa_mask = [], sa_flags = SA_RESTORER, sa_restorer = 0x7f097723a7e0}, 8) = 0 kill (0, SIGTTIN) = 0
, http://www.gnu.org/software/libc/manual/html_node/Job-Control-Signals.html
: int SIGTTIN
. - , SIGTTIN. - . , , . .
timeout 2 timeout --foreground 1 bash , - tty, .
--foreground
when not running timeout directly from a shell prompt,
allow COMMAND to read from the TTY and get TTY signals; in this mode, children of COMMAND will not be timed out
-, , , , --foreground:
timeout 3 timeout --foreground 2 timeout --foreground 1 bash
SIGNALS man bash , bash .