From 03b267e51f62b6383311cc06a8a41a906dc15753 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Wed, 4 May 2022 14:39:23 +0200 Subject: [PATCH] forker: drop parent fd in forker So that the forker dies when the parent fd is dropped. This happens in the integration tests. --- src/forker.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/forker.rs b/src/forker.rs index c829fcd0..49870589 100644 --- a/src/forker.rs +++ b/src/forker.rs @@ -103,7 +103,10 @@ impl ForkerProxy { pending_pidfds: Default::default(), fds: Default::default(), }), - Forked::Child { .. } => Forker::handle(pid, child), + Forked::Child { .. } => { + drop(parent); + Forker::handle(pid, child) + }, } }