diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2024-05-07 22:06:36 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2024-05-07 22:06:36 +0000 |
commit | 15e3e402c59089514f590bab8804f0ed60f0fee3 (patch) | |
tree | e29847fcb9b5e3913c3e4f83b11af62b30d225bc /src/libs6/s6_svstatus_unpack.c | |
parent | b827410052a640f65650d1b72d5f63d9ada28933 (diff) | |
download | s6-15e3e402c59089514f590bab8804f0ed60f0fee3.tar.xz |
Add process group support to s6-supervise
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libs6/s6_svstatus_unpack.c')
-rw-r--r-- | src/libs6/s6_svstatus_unpack.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libs6/s6_svstatus_unpack.c b/src/libs6/s6_svstatus_unpack.c index 59df671..b9b5d78 100644 --- a/src/libs6/s6_svstatus_unpack.c +++ b/src/libs6/s6_svstatus_unpack.c @@ -14,10 +14,12 @@ void s6_svstatus_unpack (char const *pack, s6_svstatus_t *sv) tain_unpack(pack + 12, &sv->readystamp) ; uint64_unpack_big(pack + 24, &pid) ; sv->pid = pid ; - uint16_unpack_big(pack + 32, &wstat) ; + uint64_unpack_big(pack + 32, &pid) ; + sv->pgid = pid ; + uint16_unpack_big(pack + 40, &wstat) ; sv->wstat = wstat ; - sv->flagpaused = pack[34] & 1 ; - sv->flagfinishing = !!(pack[34] & 2) ; - sv->flagwantup = !!(pack[34] & 4) ; - sv->flagready = !!(pack[34] & 8) ; + sv->flagpaused = pack[42] & 1 ; + sv->flagfinishing = !!(pack[42] & 2) ; + sv->flagwantup = !!(pack[42] & 4) ; + sv->flagready = !!(pack[42] & 8) ; } |