about summary refs log tree commit diff
path: root/src/libs6/s6_svstatus_unpack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6/s6_svstatus_unpack.c')
-rw-r--r--src/libs6/s6_svstatus_unpack.c12
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) ;
 }