HomeFreeBSD

flua: fbsd: avoid leaking stdin pipes on error

Description

flua: fbsd: avoid leaking stdin pipes on error

Additionally, there's no way to get to the end without a valid
stdin_pipe[1] at the moment, so don't check for it. stdin_pipe[0] is
closed earlier, as the parent shouldn't need the read-side of the pipe.

While we're here, also free the file actions earlier and on error --
they're not necessary once posix_spawnp() has returned.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D50537

(cherry picked from commit 0610ba6cdbf2d8bed2619ae78ef2da5ee9c30b94)

Details

Provenance
kevansAuthored on Jul 9 2025, 5:12 AM
emasteCommitted on Sep 11 2025, 3:09 PM
Reviewer
bapt
Differential Revision
D50537: flua: fbsd: avoid leaking stdin pipes on error
Parents
rGf56402485dd5: lposix: Clean up the posix namespace definitions
Branches
Unknown
Tags
Unknown