You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Building a test repository
mkdir gitrepo
cd gitrepo
git init
foriin$(seq 1 7);doecho"$(date) : edit : $i">> dummy.txt; git add .; git commit -m "Commit $i";done;# Starting up a git bisect session (to be able to use bisect visualize then)
git bisect start
git bisect bad HEAD
git bisect good HEAD~5
# Launch gitk from git, in background
git bisect visualize &# Now, press Ctrl+C
What did you expect to occur after running these commands?
I expect to keep gitk running, because it is a background process.
What actually happened instead?
gitk gets killed by Ctrl+C
Additionnal notes
This is not specific to git bisect visualize, this issue seems to apply on all programs launched from git, such as git difftool (I chose to show git bisect visualize in my example simply because it does not need a custom git configuration, unlike git difftool).
Furthermore, I also tested on linux, without meeting the issue (gitk keeps running).
After a few search on the internet, I suspect the PGID (bash process groups) to be responsible for the issue :
I fear that there is not a whole lot we can do about this. You see, there is no such thing as a "background process" on Windows. They are all alike. So when we kill a process using Ctrl+C, we have to traverse all of its children, too, in order to kill non-background processes correctly. But of course, as we have no way to discern between background and non-background processes, we just kill 'em all...
And this is pretty weird because there is so little difference between these two versions, according to git : d0192a7...4584fb7.
Please note that Git for Windows consists of more than just the build output for the Git source code. It contains parts of well over 100 packages, among them the MSYS2 runtime that is actually responsible for handling Ctrl+C in Git Bash. If you compare the files /etc/package-versions.txt from those two snapshots, you will learn what else changed (in addition to the Git source code).
Setup
(Windows 7 64-bit)
defaults?
I have no install-options.txt file.
I'm using a portable release : PortableGit-prerelease-2.11.0.rc0.windows.1-32-bit.7z.exe
Details
Bash
Minimal, Complete, and Verifiable example
this will help us understand the issue.
I expect to keep gitk running, because it is a background process.
gitk gets killed by Ctrl+C
Additionnal notes
This is not specific to
git bisect visualize
, this issue seems to apply on all programs launched from git, such asgit difftool
(I chose to showgit bisect visualize
in my example simply because it does not need a custom git configuration, unlike git difftool).Furthermore, I also tested on linux, without meeting the issue (gitk keeps running).
After a few search on the internet, I suspect the PGID (bash process groups) to be responsible for the issue :
Here are different processes running (after a
git bisect visualize &
) :You can see that /mingw32/bin/wish (the process holding gitk) has the same PGID than bash (11444).
The same test on linux shows that the PGID is different :
The text was updated successfully, but these errors were encountered: