> With this patch the child is guaranteed to not be in the foreground (as far > as the tty knows) so it will be getting SIGTTIN and possibly SIGTTOU on tty > operations.
You may need to correct me. In practice we see that the "timeouted" program perform successfully writes to the terminal, though it belongs to a different group then the foreground (in my case "make"'s group is in the foreground and timeout+compiler/test group is in the background, and all output of the compiler and test seem to appear correctly on the terminal). And regarding read, I think it makes sense enough that users will not use timeout for interactive programs that wait for input from the user. So maybe the fact that the timeouted program will not be able to get SIGTTIN and SIGTTOU is not such a disaster?