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
F170726476: D50537.id156066.diff
Sun, Sep 6, 6:05 AM
F170690487: D50537.diff
Sun, Sep 6, 1:21 AM
Unknown Object (File)
Fri, Sep 4, 5:02 AM
Unknown Object (File)
Thu, Sep 3, 11:29 AM
Unknown Object (File)
Thu, Sep 3, 9:14 AM
Unknown Object (File)
Thu, Sep 3, 7:56 AM
Unknown Object (File)
Wed, Sep 2, 3:21 AM
Unknown Object (File)
Tue, Sep 1, 9:20 AM
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