Discard exitcode of subprocess in a better way