summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/ntux_amain.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/driver/ntux_amain.c b/src/driver/ntux_amain.c
index 5b6587e..ae4f8f8 100644
--- a/src/driver/ntux_amain.c
+++ b/src/driver/ntux_amain.c
@@ -12,6 +12,8 @@
#include "ntux_driver_impl.h"
#include "ntux_nolibc_impl.h"
+#include <psxxfi/xfi_exit.h>
+
#ifndef NTUX_DRIVER_FLAGS
#define NTUX_DRIVER_FLAGS NTUX_DRIVER_VERBOSITY_ERRORS \
| NTUX_DRIVER_VERBOSITY_USAGE
@@ -87,11 +89,15 @@ int ntux_main(char ** argv, char ** envp, const struct ntux_fd_ctx * fdctx)
if ((ntux_version(dctx,fdout)) < 0)
return ntux_exit(dctx,NTUX_ERROR);
- if (dctx->cctx->cmd == NTUX_CMD_SPAWN)
+ if (dctx->cctx->cmd == NTUX_CMD_SPAWN) {
ntux_cmd_spawn(dctx);
+ __xfi_exit(dctx->cctx->status);
+ }
- if (dctx->cctx->cmd == NTUX_CMD_STRACE)
+ if (dctx->cctx->cmd == NTUX_CMD_STRACE) {
ntux_cmd_strace(dctx);
+ __xfi_exit(dctx->cctx->status);
+ }
for (unit=dctx->units; *unit; unit++)
ntux_perform_unit_actions(dctx,*unit);