[PATCH 1/4] programs/cmd: Introduce a helper to set std handles.