When running interactives applications that uses the terminal (curses) in pkg_config, the program gets a dumb terminal as the output redirected to tee. Reproducible: Always Steps to Reproduce: In pkg_config: 1. cd /usr/src/linux 2. make menuconfig Actual Results: You wont be able to give input to menuconfig plus the terminal is of default size (80x25) even if running in a bigger term. Expected Results: Be able to use programs that uses curses for configuration.
Created attachment 63780 [details, diff] Disables logging during pkg_config
Created attachment 63781 [details, diff] Fix for this bug. There's a little side effect to the fix, it remove the logging from pkg_config. But sometimes it does not make sens to log anyway, as in any curses/X based configuration.
Does /dev/tty magic work on *BSD and Darwin in the same fashion that it does on Linux? It was suggested that packages that wish to use ncurses or such should run `exec < /dev/tty > /dev/tty` or something to that effect. Will this work as expected?
to me, it seems like /dev/tty works the same on ppc-macos as on linux. if I cat /dev/tty and type something and press return, it is nicely written twice, so I think it does what you want.
{ echo foo >/dev/tty ; } </dev/null &>/dev/null and ( ( sleep 2 ; echo foo >/dev/tty ) & disown ) </dev/null &>/dev/null were the two test cases I were given.
Both those testcases work the same way on FreeBSD as on Linux. If OSX behaves the same way it looks like a reasonable enough workaround.
Kito has confirmed that it works on Darwin as well. That means that there's a workaround on *NIX systems for the few pkg_config's that won't work with tee while the rest can still be logged.