From 43c39889952741fcc5565d0660e8f2c887e5cae1 Mon Sep 17 00:00:00 2001 From: ~hatteb-mitlyd Date: Mon, 12 May 2014 15:42:43 -0700 Subject: [PATCH] add exit code to %logo card --- include/v/vere.h | 1 + v/loop.c | 2 +- v/main.c | 2 +- v/reck.c | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/v/vere.h b/include/v/vere.h index 6d9c011f10..4f8d090df6 100644 --- a/include/v/vere.h +++ b/include/v/vere.h @@ -534,6 +534,7 @@ u2_unix unx_u; // sync and clay u2_batz beh_u; // batz timer u2_bean liv; // if u2_no, shut down + c3_i xit_i; // exit code for shutdown void* ssl_u; // struct SSL_CTX* u2_reck* arv_u; // runtime diff --git a/v/loop.c b/v/loop.c index da8de9e8f3..c58d91cb48 100644 --- a/v/loop.c +++ b/v/loop.c @@ -483,7 +483,7 @@ u2_lo_shut(u2_bean inn) u2_loom_exit(); u2_lo_exit(); - exit(0); + exit(u2_Host.xit_i); } else { // poll arvo to generate any event binding changes diff --git a/v/main.c b/v/main.c index 3787c43236..cdac948efd 100644 --- a/v/main.c +++ b/v/main.c @@ -303,7 +303,7 @@ main(c3_i argc, // Instantiate process globals. { u2_wr_check_init(u2_Host.ops_u.cpu_c); - + u2_Host.xit_i = 0; if ( (u2_no == u2_Host.ops_u.nuu) && (u2_yes == u2_loom_load()) ) { diff --git a/v/reck.c b/v/reck.c index 33d40a4019..aac56d4fd6 100644 --- a/v/reck.c +++ b/v/reck.c @@ -628,6 +628,7 @@ _reck_kick_term(u2_reck* rec_u, u2_noun pox, c3_l tid_l, u2_noun fav) case c3__logo: { u2_Host.liv = u2_no; + u2_Host.xit_i = u2t(fav); u2z(pox); u2z(fav); return u2_yes; } break;