getlogin returns nil when it's called from a non-login shell