[Rpm-maint] [rpm-software-management/rpm] Add rpm.spawn() Lua API (PR #3241)
Panu Matilainen
notifications at github.com
Thu Aug 22 05:56:53 UTC 2024
@pmatilai commented on this pull request.
> +
+#### spawn({command} [, {actions}])
+
+Spawn, aka execute, an external program. (rpm >= 4.20)
+
+`{command}` is a table consisting of the command and its arguments.
+An optional second table can be used to pass various actions related
+to the command execution, currently supported are:
+
+| Action | Argument(s) | Description
+|---------|----------------------
+| `stdin` | path | Redirect standard input to path
+| `stdout`| path | Redirect standard output to path
+| `stderr`| path | Redirect standard error to path
+
+Returns the command exit status.
Interesting. The difference comes from executing posix_spawn_file_actions_init(), even if it's empty. And rpm.spawn() always initializes it to keep things simple, under the assumption that an empty set doesn't make any difference, right? :smile: Good spotting, thanks.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3241#discussion_r1726386119
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3241/review/2253558803 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240821/24573fb3/attachment.html>
More information about the Rpm-maint
mailing list