Fix: mainloop: Canceling in-flight operations should not fail if child process has already exited.
There's a race condition where we might try and cancel an operation
at the same time it is completing. Depending on the order mainloop
interprets those two conditions the operation might look like it failed
to be canceled, even though the operation's pid has already exited.