The name or jid always gets added to the params, and that's enough to avoid allocating a 0 length params array.
Details
Details
# /usr/libexec/flua -l jail -e 'jail.setparams("myjail", {}, jail.CREATE | jail.ATTACH)' -e 'os.execute("ps ax")' PID TT STAT TIME COMMAND 2412 2 S+J 0:00.00 /usr/libexec/flua -l jail -e jail.setparams("myjail", {}, jail.CREATE|jail.ATTACH) -e os 2413 2 R+J 0:00.00 ps ax # /usr/libexec/flua -l jail -l ucl <<EOF jail.setparams("myjail", {persist="true"}, jail.CREATE) _, params = jail.getparams("myjail", {}) print(ucl.to_json(params)) jail.setparams("myjail", {persist="false"}, jail.UPDATE) EOF { "name": "myjail" }
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable