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)
Mon, Nov 24, 1:31 PM
Unknown Object (File)
Sun, Nov 9, 2:21 AM
Unknown Object (File)
Fri, Nov 7, 12:32 AM
Unknown Object (File)
Oct 28 2025, 10:44 PM
Unknown Object (File)
Oct 17 2025, 2:18 AM
Unknown Object (File)
Oct 12 2025, 6:48 PM
Unknown Object (File)
Oct 5 2025, 5:30 AM
Unknown Object (File)
Oct 4 2025, 5:44 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 Not Applicable
Unit
Tests Not Applicable