Skip to content

kill tox process does not kill running commands #1772

@dajose

Description

@dajose

Tox seems to not being sending the sigterm signal back to the subprocess it is driving.

This can be reproduced with this configuration, and killing the tox process.

tox.ini

[tox]
skipsdist = True

[testenv:papa]
commands =
    {envpython} {toxinidir}/papa.py

papa.py

from time import sleep
while True:
   sleep(1)
   print('papa')

from a terminal run

tox -e papa

and on another, search the process and kill it, for example:

diazdavi@darker:/tmp$ ps -aux | grep tox
diazdavi  779128  6.3  0.1 114196 22588 pts/0    S+   17:00   0:00 /usr/bin/python3 /usr/local/bin/tox -e papa
diazdavi  779140  0.5  0.0  26912  9500 pts/0    S+   17:00   0:00 /tmp/.tox/papa/bin/python papa.py
diazdavi  779178  0.0  0.0  17664  2700 pts/2    S+   17:00   0:00 grep --color=auto tox
diazdavi@darker:/tmp$ kill 779128

The first terminal will keep showing the prints :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug:normalaffects many people or has quite an impact

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions