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, Dec 29, 3:24 AM
Unknown Object (File)
Tue, Dec 16, 3:12 PM
Unknown Object (File)
Nov 24 2025, 1:31 PM
Unknown Object (File)
Nov 9 2025, 2:21 AM
Unknown Object (File)
Nov 7 2025, 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
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