Skip to content

Commit 62756ca

Browse files
committed
DPL: add protection against fork bomb
1 parent 72b9f51 commit 62756ca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Framework/Core/src/runDataProcessing.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,11 @@ void spawnDevice(uv_loop_t* loop,
748748
for (auto& env : execution.environ) {
749749
putenv(strdup(DeviceSpecHelpers::reworkTimeslicePlaceholder(env, spec).data()));
750750
}
751-
execvp(execution.args[0], execution.args.data());
751+
int err = execvp(execution.args[0], execution.args.data());
752+
if (err) {
753+
perror("Unable to start child process");
754+
exit(1);
755+
}
752756
} else {
753757
O2_SIGNPOST_ID_GENERATE(sid, driver);
754758
O2_SIGNPOST_EVENT_EMIT(driver, sid, "spawnDevice", "New child at %{pid}d", id);

0 commit comments

Comments
 (0)