Actually.. shouldn't that be done only if isatty is 1? Otherwise I'm not sure how this fails.