[master 3/4] Remove iutil.fork_orphan

David Shea dshea at redhat.com
Fri Aug 8 19:32:49 UTC 2014


This method has been unused since ssh password handling was moved into
handle-sshpw, in 2012.
---
 pyanaconda/iutil.py | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index e426511..29aff76 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -415,21 +415,6 @@ def setup_translations(module):
         add_po_path(module, TRANSLATIONS_UPDATE_DIR)
     module.textdomain("anaconda")
 
-def fork_orphan():
-    """Forks an orphan.
-
-    Returns 1 in the parent and 0 in the orphaned child.
-    """
-    intermediate = os.fork()
-    if not intermediate:
-        if os.fork():
-            # the intermediate child dies
-            os._exit(0)
-        return 0
-    # the original process waits for the intermediate child
-    os.waitpid(intermediate, 0)
-    return 1
-
 def _run_systemctl(command, service):
     """
     Runs 'systemctl command service.service'
-- 
1.9.3



More information about the anaconda-patches mailing list