diff options
author | Laurent Ghigonis <laurent@p1sec.com> | 2012-11-30 15:41:42 +0100 |
---|---|---|
committer | Laurent Ghigonis <laurent@p1sec.com> | 2012-11-30 15:41:42 +0100 |
commit | 1dbff7968b005e6aedc9c22e6d5e954e948d1ff3 (patch) | |
tree | 9d739f729327f1e7c1d5a7ca3b67926218a82e4f /libglouglou/libglouglou.c | |
parent | check pkt->type in pkt_encode() (diff) | |
download | glouglou-1dbff7968b005e6aedc9c22e6d5e954e948d1ff3.tar.xz glouglou-1dbff7968b005e6aedc9c22e6d5e954e948d1ff3.zip |
handle process exit events
Diffstat (limited to 'libglouglou/libglouglou.c')
-rw-r--r-- | libglouglou/libglouglou.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libglouglou/libglouglou.c b/libglouglou/libglouglou.c index aa50611..c2c284a 100644 --- a/libglouglou/libglouglou.c +++ b/libglouglou/libglouglou.c @@ -490,6 +490,11 @@ pkt_decode(char **buf, int *buf_len) strncpy((char *)newpkt.exec_cmd, (char *)pkt->exec_cmd, newpkt.exec_cmdlen); break; + case PACKET_EXIT: + newpkt.exit_pid = ntohl(pkt->exit_pid); + newpkt.exit_tgid = ntohl(pkt->exit_tgid); + newpkt.exit_ecode = pkt->exit_ecode; + break; default: goto invalid; invalid("type switch"); @@ -565,6 +570,11 @@ pkt_encode(struct gg_packet *pkt, int *len) strncpy((char *)newpkt.exec_cmd, (char *)pkt->exec_cmd, pkt->exec_cmdlen); break; + case PACKET_EXIT: + newpkt.exit_pid = htonl(pkt->exit_pid); + newpkt.exit_tgid = htonl(pkt->exit_tgid); + newpkt.exit_ecode = pkt->exit_ecode; + break; default: error("Unsupported packet type"); return NULL; |