[Rpm-maint] [rpm-software-management/rpm] Add rpm.spawn() Lua API (PR #3241)
Panu Matilainen
notifications at github.com
Tue Aug 27 12:03:02 UTC 2024
@pmatilai commented on this pull request.
> @@ -804,8 +881,13 @@ static int rpm_execute(lua_State *L)
return pusherror(L, status, NULL);
if (waitpid(pid, &status, 0) == -1)
return pusherror(L, errno, NULL);
- if (status != 0)
- return pusherror(L, status, "exit code");
+ if (status != 0) {
+ if (WIFSIGNALED(status)) {
+ return pusherror(L, WTERMSIG(status), "exit signal");
+ } else {
+ return pusherror(L, WEXITSTATUS(status), "exit code");
+ }
+ }
return pushresult(L, status);
That will only be reached when status is zero, so it doesn't make any difference.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3241#discussion_r1732714896
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3241/review/2263109823 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240827/202f2f67/attachment.html>
More information about the Rpm-maint
mailing list