let check_exit_status = function
| Unix.WEXITED 0 -> ()
| Unix.WEXITED r -> warning "warning: the process terminated with exit code (%d)\n%!" r
| Unix.WSIGNALED n -> warning "warning: the process was killed by a signal (number: %d)\n%!" n
| Unix.WSTOPPED n -> warning "warning: the process was stopped by a signal (number: %d)\n%!" n