summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-11-13 13:34:47 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-11-13 13:34:47 +0000
commit9811ef53b65027091afc252cba859383419d6c94 (patch)
tree93f4d1e5b805a6593b031b4e3735273c3d4b902f /src
parent501b54278cf3965d9d38dba81870c4ea371d20a3 (diff)
downloads6-rc-9811ef53b65027091afc252cba859383419d6c94.tar.xz
- better error codes in s6-rc-update
- doc fixes
Diffstat (limited to 'src')
-rw-r--r--src/s6-rc/s6-rc-update.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/s6-rc/s6-rc-update.c b/src/s6-rc/s6-rc-update.c
index 608ecf3..d94a572 100644
--- a/src/s6-rc/s6-rc-update.c
+++ b/src/s6-rc/s6-rc-update.c
@@ -744,7 +744,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (verbosity >= 2) strerr_warni1x("computing state adjustments") ;
compute_transitions(convfile, oldstate, fdoldc, &olddb, newstate, invimage, fdnewc, argv[0], &newdb, &sa) ;
tain_now_g() ;
- if (!tain_future(&deadline)) strerr_dief1x(2, "timed out while computing state adjutments") ;
+ if (!tain_future(&deadline)) strerr_dief1x(10, "timed out while computing state adjutments") ;
/* Down transition */
@@ -786,7 +786,11 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (wait_pid(pid, &wstat) < 0) strerr_diefu1sys(111, "waitpid") ;
tain_now_g() ;
if (WIFSIGNALED(wstat) || WEXITSTATUS(wstat))
- strerr_dief1x(wait_estatus(wstat), "first s6-rc invocation failed") ;
+ {
+ wstat = wait_estatus(wstat) ;
+ if (wstat == 1 || wstat == 2) wstat += 8 ;
+ strerr_dief1x(wstat, "first s6-rc invocation failed") ;
+ }
}
if (!dryrun)