OK, somehow there was a core dump in /etc/env.d and this was causing eselect env update to go into an infinite loop. Nastily, this was hidden by the command "eselect opengl set xorg-x11" - bad opengl, should always output errors to stderr!
Created attachment 74239 [details, diff] stops env working on core files and opengl outputs errors now Ideally there should be a better way of testing binary files or not, but this works for me.
Roy: I used a slightly different approach than yours. Using "file -i" and grepping for text plain should do the work. Further, if a files doesn't contain any vars, we'll just not process it. In SVN already, fix will ship with next release (hopefully eselect-1.0).
In 1.0.