sh -c "/usr/bin/time perl -e '$|=1; print getlogin(), chr(10)' - prints username sh -c "/usr/bin/time perl -e '$|=1; print getlogin(), chr(10)' & wait" - prints nothing - that is sh -c "/usr/bin/time perl -e '$|=1; print \$ENV{USER}, chr(10)' & wait" - prints username