diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-07-20 20:20:54 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-07-20 20:20:54 +0000 |
commit | a3cdeecf0033919e3b5a79c17c19b5ac98719256 (patch) | |
tree | 92a930930f18a4f8ae897b1a69c39358137ce1e2 /src/libs6/s6_svstatus_pack.c | |
parent | bd34de9054cec794d96b0fde1eee9100e1d34215 (diff) | |
download | s6-a3cdeecf0033919e3b5a79c17c19b5ac98719256.tar.xz |
- Add timeout-finish support and "down-readiness"
- LOTS of refactoring to make this work
- Remove s6-notifywhenup
- s6-supervise now rocks the casbah
- rc for 2.2.0.0
Diffstat (limited to 'src/libs6/s6_svstatus_pack.c')
-rw-r--r-- | src/libs6/s6_svstatus_pack.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libs6/s6_svstatus_pack.c b/src/libs6/s6_svstatus_pack.c index 2b1f102..cc92621 100644 --- a/src/libs6/s6_svstatus_pack.c +++ b/src/libs6/s6_svstatus_pack.c @@ -1,6 +1,6 @@ /* ISC license. */ -#include <skalibs/uint32.h> +#include <skalibs/uint16.h> #include <skalibs/uint64.h> #include <skalibs/tai.h> #include <s6/s6-supervise.h> @@ -8,8 +8,13 @@ void s6_svstatus_pack (char *pack, s6_svstatus_t const *sv) { tain_pack(pack, &sv->stamp) ; - uint32_pack(pack + 12, (uint32)sv->pid) ; - pack[16] = sv->flagpaused | (sv->flagfinishing << 1) ; - pack[17] = sv->flagwant ? sv->flagwantup ? 'u' : 'd' : 0 ; - uint64_pack(pack + 18, (uint64)sv->wstat) ; + tain_pack(pack + 12, &sv->readystamp) ; + uint64_pack_big(pack + 24, (uint64)sv->pid) ; + uint16_pack_big(pack + 32, (uint16)sv->wstat) ; + pack[34] = + sv->flagpaused | + (sv->flagfinishing << 1) | + (sv->flagwant << 2) | + (sv->flagwantup << 3) | + (sv->flagready << 4) ; } |