close stdin after cmd is exited.