Use WEXITSTATUS to get the status.