git ls-remote expects stdin to be open so don't close it.

$ git ls-remote upstream master
0951f72dc29b7bda21f4e253eac2ab38ef03a60a  refs/heads/master

$ git ls-remote upstream master 0<&-
$

Don't close stdin in the launcher/daemonized script, which is the parent of all processes during the nightly build.

See also: http://git.661346.n2.nabble.com/Bug-Failure-if-stdin-is-closed-td7591627.html