diff --git a/git/cmd.py b/git/cmd.py index 8b42dec52..af748e529 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -879,11 +879,19 @@ def execute( Specifies a timeout in seconds for the git command, after which the process should be killed. This will have no effect if `as_process` is set to True. It is set to None by default and will let the process run until the timeout - is explicitly specified. This feature is not supported on Windows. It's also - worth noting that `kill_after_timeout` uses SIGKILL, which can have negative - side effects on a repository. For example, stale locks in case of ``git gc`` - could render the repository incapable of accepting changes until the lock is - manually removed. + is explicitly specified. Uses of this feature should be carefully + considered, due to the following limitations: + + 1. This feature is not supported at all on Windows. + 2. Effectiveness may vary by operating system. ``ps --ppid`` is used to + enumerate child processes, which is available on most GNU/Linux systems + but not most others. + 3. Deeper descendants do not receive signals, though they may sometimes + terminate as a consequence of their parent processes being killed. + 4. `kill_after_timeout` uses ``SIGKILL``, which can have negative side + effects on a repository. For example, stale locks in case of ``git gc`` + could render the repository incapable of accepting changes until the lock + is manually removed. :param with_stdout: If True, default True, we open stdout on the created process.