Page MenuHomeFreeBSD

flua: fbsd: avoid leaking stdin pipes on error
ClosedPublic

Authored by kevans on May 27 2025, 12:03 AM.
Tags
None
Referenced Files
F165994631: D50537.id.diff
Mon, Aug 10, 9:21 PM
F165945663: D50537.id158201.diff
Mon, Aug 10, 4:28 PM
Unknown Object (File)
Mon, Aug 10, 5:40 AM
Unknown Object (File)
Sun, Aug 9, 5:11 PM
Unknown Object (File)
Sun, Aug 9, 12:06 AM
Unknown Object (File)
Sat, Aug 8, 7:37 PM
Unknown Object (File)
Tue, Jul 21, 6:36 PM
Unknown Object (File)
Tue, Jul 21, 2:14 PM
Subscribers

Details

Summary

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 -- they're not
necessary once posix_spawn() has returned.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable