summaryrefslogtreecommitdiffstats
path: root/lem/signal/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'lem/signal/core.c')
-rw-r--r--lem/signal/core.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lem/signal/core.c b/lem/signal/core.c
index 2f6f228..45be7fc 100644
--- a/lem/signal/core.c
+++ b/lem/signal/core.c
@@ -164,6 +164,8 @@ signal_child_handler(EV_P_ struct ev_child *w, int revents)
{
lua_State *S;
int status;
+ int pid = w->pid;
+ int rpid = w->rpid;
(void)revents;
@@ -177,7 +179,12 @@ signal_child_handler(EV_P_ struct ev_child *w, int revents)
lua_pushinteger(S, SIGCHLD);
status = w->rstatus;
- lua_createtable(S, 0, 3);
+ lua_createtable(S, 0, 5);
+
+ lua_pushinteger(S, pid);
+ lua_setfield(S, -2, "pid");
+ lua_pushinteger(S, rpid);
+ lua_setfield(S, -2, "rpid");
if (WIFEXITED(status)) {
lua_pushinteger(S, WEXITSTATUS(status));