+/**
+ * Wait for a process with PID pid to finish.
+ *
+ * If block is false, this function will not block, and return WRes.RUNNING if
+ * the process is still running. Otherwise it will return always WRes.DONE
+ * (unless there is an error, in which case WRes.ERROR is returned).
+ */
+WRes wait_pid(pid_t pid, bool block = true);
+