Page MenuHomeFreeBSD

diff: Fix pagination leak
ClosedPublic

Authored by des on Feb 4 2026, 6:35 PM.
Tags
None
Referenced Files
F154303484: D55112.id171222.diff
Mon, Apr 27, 5:27 PM
Unknown Object (File)
Mon, Apr 20, 3:29 AM
Unknown Object (File)
Sat, Apr 18, 1:29 PM
Unknown Object (File)
Sun, Apr 12, 7:18 PM
Unknown Object (File)
Tue, Apr 7, 10:47 PM
Unknown Object (File)
Mar 20 2026, 10:09 PM
Unknown Object (File)
Mar 6 2026, 4:27 PM
Unknown Object (File)
Mar 2 2026, 5:55 PM
Subscribers

Details

Summary
  • Drop an unnecessary variable and rename pidfd to procd.
  • Rewinding stdout serves no purpose, so stop doing it.
  • Don't bother freeing memory or setting the global status right before erroring out.
  • Error out if dup(2) or dup2(2) fail.
  • In the unlikely case that our pipe is equal to stdout, we need to record that information so we don't close it when cleaning up.
  • Don't bother closing a descriptor before dup2(2)ing to it.
  • Don't forget to close the the process descriptor after reaping the child process.

PR: 266592
MFC after: 1 week
Sponsored by: Klara, Inc.

Diff Detail

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

Event Timeline

This revision is now accepted and ready to land.Feb 5 2026, 1:40 PM
This revision was automatically updated to reflect the committed changes.