Jason Stubbs wrote: > On Wednesday 20 July 2005 15:38, Drake Wyrm wrote: > > Jason Stubbs wrote: > > > When logging is enabled, ebuild output is passed via tee. Running > > > anything that checks for terminal type inside of pkg_config > > > therefore doesn't work correctly. This patch disables logging > > > during pkg_config altogether. > > > > A cleaner way of accomplishing that is to write the ebuild such that > > portions which need a terminal either attach to a terminal (`make > > menuconfig /dev/tty`) > > Forgive my ignorance, but how does this work when it comes to > multiuser? You mean when there's multiple terminals in use? The device "/dev/tty" has more magic. No matter what terminal you're using, even if stdin, stdout, and stderr have been closed or redirected, "/dev/tty" is _always_ your current terminal. { echo foo >/dev/tty ; } /dev/null Still gets through! Or even more detached: ( ( sleep 2 ; echo foo >/dev/tty ) & disown ) /dev/null The only way this can fail is if the terminal actually closes. ( ( sleep 2 ; echo foo >/dev/tty || touch /tmp/wombat ) & \ disown ) /dev/null ; exit Other apps use this, also. You may have noticed that when you drop to shell from `less` and type `tty`, you're no longer attached to /dev/pts/* or /dev/vc/*, but simply to /dev/tty. Do the same thing in multiple xterms, and you'll find yourself with several terminals all attached to unique instances of /dev/tty which have nothing to do with each other. More magic. -- Batou: Hey, Major... You ever hear of "human rights"? Kusanagi: I understand the concept, but I've never seen it in action. -- "Ghost in the Shell", Shirow Masamune