From 416d7f47eb60d778a5a8e92dc979f2c0df7bcad6 Mon Sep 17 00:00:00 2001
From: Oleksii Shevchuk
Date: Thu, 2 Mar 2017 16:32:36 +0200
Subject: [PATCH] Prevent zobmie creation
---
pupy/pp.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/pupy/pp.py b/pupy/pp.py
index e362a331..2b19c4d0 100755
--- a/pupy/pp.py
+++ b/pupy/pp.py
@@ -62,6 +62,7 @@ from network.lib.connection import PupyConnection
import logging
import shlex
import marshal
+import signal
try:
# additional imports needed to package with pyinstaller
@@ -215,6 +216,9 @@ def set_connect_back_host(HOST):
import pupy
pupy.get_connect_back_host = (lambda: HOST)
+def handle_sigchld(*args, **kwargs):
+ os.waitpid(-1, os.WNOHANG)
+
attempt = 0
debug = False
@@ -279,6 +283,8 @@ def main():
exited = False
+ signal.signal(signal.SIGCHLD, handle_sigchld)
+
while not exited:
try:
rpyc_loop(launcher)