Clean up child processes from proxy type exec.
authorGuus Sliepen <guus@tinc-vpn.org>
Fri, 18 Oct 2013 15:05:35 +0000 (17:05 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Fri, 18 Oct 2013 15:05:35 +0000 (17:05 +0200)
src/net.c

index b2fe0dece912b1662ca86bc1741594ddf0c9f7f6..c5e5707b9ae415538e3db79ca8cc21dae0c8f90b 100644 (file)
--- a/src/net.c
+++ b/src/net.c
@@ -212,6 +212,12 @@ void terminate_connection(connection_t *c, bool report) {
                c->status.remove = false;
                do_outgoing_connection(c);      
        }
+
+#ifndef HAVE_MINGW
+       /* Clean up dead proxy processes */
+
+       while(waitpid(-1, NULL, WNOHANG) > 0);
+#endif
 }
 
 /*