stdio termination when using shell