aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.posix/posix.spawn.ccm
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.posix/posix.spawn.ccm')
-rw-r--r--nihil.posix/posix.spawn.ccm7
1 files changed, 2 insertions, 5 deletions
diff --git a/nihil.posix/posix.spawn.ccm b/nihil.posix/posix.spawn.ccm
index 5812716..4cce334 100644
--- a/nihil.posix/posix.spawn.ccm
+++ b/nihil.posix/posix.spawn.ccm
@@ -229,12 +229,9 @@ spawn(executor auto &&executor, auto &&...actions)
auto proc = process(pid);
if (pid == 0) {
- // We are in the child. Release the process so we don't
- // try to wait for ourselves, then run child handlers and
- // exec the process.
-
- std::ignore = std::move(proc).release();
+ // We are in the child.
(actions.run_in_child(proc), ...);
+ std::ignore = std::move(proc).release();
auto err = executor.exec();
std::print("{}\n", err.error());