From: Tommi Rantala <[email protected]>
The tipc-pipe server mode forks a child per connection, but does not reap the
child processes after they are done.
Use signal(SIGCHLD, SIG_IGN) to get rid of the zombies automatically.
---
tipc-pipe/tipc-pipe.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tipc-pipe/tipc-pipe.c b/tipc-pipe/tipc-pipe.c
index bf1888b..8f9eff0 100644
--- a/tipc-pipe/tipc-pipe.c
+++ b/tipc-pipe/tipc-pipe.c
@@ -601,6 +601,8 @@ int init(int argc, char *argv[])
int run_server(int tipc)
{
trl();
+ /* avoid zombies */
+ if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) perror("signal()");
chkne(bind(tipc, (void *)&addr_sk, sizeof(addr_sk)));
switch (sock_type) {
case SOCK_SEQPACKET:
--
2.9.3
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
tipc-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tipc-discussion