It seems that if the shell is started this way rather than directly on the commandline, it complains "Can't ioctl TIOCGETP: Invalid argument" - readline etc. work anyway, so the env variable disables the warning.