• Kirill Smelkov's avatar
    Stop spawned process softly on ctx cancel · 34cb7879
    Kirill Smelkov authored
    In 0ad45a9c (Detect if a test leaks processes and terminate them) we
    organized waiting for spawned processes with handing ctx and sending
    SIGKILL to the main spawned process on ctx cancel even though other
    leaked processes are always first sent with SIGTERM and - only after
    shutdown timeout - later with SIGKILL.
    
    This is too brutal. Rework the code to first send SIGTERM to the main
    spawned test process too, and leverage SIGKILL only later after shutdown
    timeout.
    
    This will be tested in a later patch which exercises how cancel from
    master is propagated.
    
    /reviewed-by @jerome
    /reviewed-on nexedi/nxdtest!14
    34cb7879
__init__.py 19.5 KB