Revert "Command executed doesn't wait for stdin from shell"

This reverts commit d43857d8276119d078c047f452803e39781b0a1e.

Reverted as itdoesn't preserve shell state as every command is run in a
subshell. So export, cd and other bash internal commands don't
change the state of the shell.