Skip to content

Commit 7b08624

Browse files
authored
DPL: add protection against fork bomb (#14858)
1 parent f355002 commit 7b08624

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)