History log of /src/libexec/flua/lfbsd/lfbsd.c (Results 1 – 7 of 7)
Revision Date Author Comments
# b11a5709 04-Oct-2025 Kyle Evans <kevans@FreeBSD.org>

flua: kick out the remaining builtin modules

Bootstrap flua has some magic now to handle modules by building them in
and discovering them via linker sets. This is slightly cleaner than
always build

flua: kick out the remaining builtin modules

Bootstrap flua has some magic now to handle modules by building them in
and discovering them via linker sets. This is slightly cleaner than
always building them in and baking them into loadedlibs for both
bootstrap and system flua.

Adjust the stand build now that these three libs have their own new
homes.

Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D51891

show more ...


# d4c973fa 04-Oct-2025 Kyle Evans <kevans@FreeBSD.org>

Revert "flua: kick out the remaining builtin modules"

This reverts commit 80ada959004c4386880e47b11618f8abfc2d80e1, because
bootstrap flua is about to get backed out.


# 80ada959 03-Oct-2025 Kyle Evans <kevans@FreeBSD.org>

flua: kick out the remaining builtin modules

Bootstrap flua has some magic now to handle modules by building them in
and discovering them via linker sets. This is slightly cleaner than
always build

flua: kick out the remaining builtin modules

Bootstrap flua has some magic now to handle modules by building them in
and discovering them via linker sets. This is slightly cleaner than
always building them in and baking them into loadedlibs for both
bootstrap and system flua.

Adjust the stand build now that these three libs have their own new
homes.

Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D51891

show more ...


# 3f0e1092 09-Jul-2025 Kyle Evans <kevans@FreeBSD.org>

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

This allows us to do things like:

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

while true do

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

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.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D50539

show more ...


# 6a2c624b 09-Jul-2025 Kyle Evans <kevans@FreeBSD.org>

flua: fbsd: return a process handle to operate on when we exec()

This gives us some way to be able to write to stdin if we want to, or
as a future improvement, will allow us to extract stdout from t

flua: fbsd: return a process handle to operate on when we exec()

This gives us some way to be able to write to stdin if we want to, or
as a future improvement, will allow us to extract stdout from the
process. The handle is setup to close and waitpid() on close/gc so that
existing users wouldn't necessarily leak for the lifetime of the script
if they weren't adopted to the new model.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D50538

show more ...


# 0610ba6c 09-Jul-2025 Kyle Evans <kevans@FreeBSD.org>

flua: fbsd: avoid leaking stdin pipes on error

Additionally, there's no way to get to the end without a valid
stdin_pipe[1] at the moment, so don't check for it. stdin_pipe[0] is
closed earlier, as

flua: fbsd: avoid leaking stdin pipes on error

Additionally, there's no way to get to the end without a valid
stdin_pipe[1] at the moment, so don't check for it. stdin_pipe[0] is
closed earlier, as the parent shouldn't need the read-side of the pipe.

While we're here, also free the file actions earlier and on error --
they're not necessary once posix_spawnp() has returned.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D50537

show more ...


# 1f31e00e 13-Sep-2023 Baptiste Daroussin <bapt@FreeBSD.org>

flua: add fbsd module

This module is bundled into flua, it only provides for now the exec
function. The point of the function is to be able to execute a program
without actually executing a shell.

flua: add fbsd module

This module is bundled into flua, it only provides for now the exec
function. The point of the function is to be able to execute a program
without actually executing a shell.

to use it:
fbsd.exec({"id", "bapt"})

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D41840

show more ...