Page MenuHomeFreeBSD

diff: Fix pagination leak
ClosedPublic

Authored by des on Feb 4 2026, 6:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jun 16, 8:27 AM
Unknown Object (File)
Fri, Jun 12, 5:41 PM
Unknown Object (File)
Tue, Jun 9, 5:22 PM
Unknown Object (File)
Tue, Jun 9, 11:38 AM
Unknown Object (File)
Sun, Jun 7, 11:02 AM
Unknown Object (File)
Thu, Jun 4, 10:09 PM
Unknown Object (File)
May 17 2026, 10:16 PM
Unknown Object (File)
May 17 2026, 10:08 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.