From 1dbff7968b005e6aedc9c22e6d5e954e948d1ff3 Mon Sep 17 00:00:00 2001 From: Laurent Ghigonis Date: Fri, 30 Nov 2012 15:41:42 +0100 Subject: handle process exit events --- libglouglou/libglouglou.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libglouglou/libglouglou.c') 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; -- cgit v1.2.3-59-g8ed1b