Page MenuHomeFreeBSD

flua: fbsd: allow stdout to be captured for exec() processes
ClosedPublic

Authored by kevans on May 27 2025, 12:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Feb 8, 8:16 PM
Unknown Object (File)
Tue, Feb 3, 5:47 PM
Unknown Object (File)
Sun, Feb 1, 3:42 PM
Unknown Object (File)
Jan 4 2026, 7:40 AM
Unknown Object (File)
Dec 29 2025, 3:24 AM
Unknown Object (File)
Dec 16 2025, 3:12 PM
Unknown Object (File)
Nov 24 2025, 1:31 PM
Unknown Object (File)
Nov 9 2025, 2:21 AM
Subscribers

Details

Summary

This allows us to do things like:

local fp = assert(fbsd.exec({"ls", "-l"}, true))
local fpout = assert(fp:stdout())

while true do
        local line = fpout:read("l")
        if not line then break end
        print("Read: " .. line)
end

fp:close()

The makeman lua rewrite will use it to capture make showconfig output
for processing.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 64450
Build 61334: arc lint + arc unit