diff options
author | midipix <writeonce@midipix.org> | 2019-12-22 14:22:04 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2019-12-22 14:24:04 +0000 |
commit | 74fb0cae63ff0baaaaac19f0624a76a3f869b847 (patch) | |
tree | f55075591567f80bdf404a9f1d2cf9430c622bb0 /src/cmds | |
parent | 64aceef0d41aac4021b1d9247401f7909f846b82 (diff) | |
download | ntux-74fb0cae63ff0baaaaac19f0624a76a3f869b847.tar.bz2 ntux-74fb0cae63ff0baaaaac19f0624a76a3f869b847.tar.xz |
ntux_cmd_spawn(), ntux_cmd_strace(): pass-through exit code of child process.
Diffstat (limited to 'src/cmds')
-rw-r--r-- | src/cmds/ntux_cmd_spawn.c | 5 | ||||
-rw-r--r-- | src/cmds/ntux_cmd_strace.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/cmds/ntux_cmd_spawn.c b/src/cmds/ntux_cmd_spawn.c index f488e3e..c4486fc 100644 --- a/src/cmds/ntux_cmd_spawn.c +++ b/src/cmds/ntux_cmd_spawn.c @@ -45,8 +45,11 @@ int ntux_cmd_spawn(const struct ntux_driver_ctx * dctx) __sys_exit(0); /* parent */ + struct ntux_driver_ctx_impl * ictx = ntux_get_driver_ictx(dctx); + __sys_wait4( - pid,&status, + pid, + &ictx->cctx.status, 0,0); return 0; diff --git a/src/cmds/ntux_cmd_strace.c b/src/cmds/ntux_cmd_strace.c index bdc1308..a91e1d5 100644 --- a/src/cmds/ntux_cmd_strace.c +++ b/src/cmds/ntux_cmd_strace.c @@ -132,8 +132,11 @@ int ntux_cmd_strace(const struct ntux_driver_ctx * dctx) return NTUX_SYSTEM_ERROR(dctx); /* wait */ + struct ntux_driver_ctx_impl * ictx = ntux_get_driver_ictx(dctx); + __sys_wait4( - pid,&status, + pid, + &ictx->cctx.status, 0,0); return 0; |