Ticket #27769: sage-cleaner.patch

File sage-cleaner.patch, 746 bytes (added by andy, 3 years ago)

Patch to prevent sage-cleaner from doing a kill 0

  • src/bin/sage-cleaner

    diff --git a/src/bin/sage-cleaner b/src/bin/sage-cleaner
    index 5fbe2172aa..91f94fadbb 100755
    a b def kill_spawned_jobs(jobfile, parent_pid): 
    112112            continue
    113113        try:
    114114            pgrp = os.getpgid(pid)
    115             logger.info("--> Killing process group %s", pgrp)
    116             os.killpg(pgrp, signal.SIGKILL)
     115            if not pgrp == 0:
     116                logger.info("--> Killing process group %s", pgrp)
     117                os.killpg(pgrp, signal.SIGKILL)
     118            else:
     119                logger.info("--> Process group of PID %s is 0. Not killing process group", pid)
     120               
    117121        except OSError:
    118122            pass
    119123        if is_running(pid):