Hi Alex
Thanks for the report
On 22/11/2021 08:42, Alexander Veit wrote:
After an update from Git 2.25.1 to 2.34.0 the Java application that uses
the Eclipse JGit library freezes.
Strace suggests that the JVM receives a SIGTTOU from the child process
"git config --system --edit" created with java.lang.ProcessBuilder.
Upstream[1] has identified 3d411afa[2] as the possible commit that
introduced the problem.
The problem does not occur on all Linux systems.
I think the problem is possibly that git is calling tcsetattr() from a
background process group[1]. A possible fix would be to call tcgetpgrp()
after opening /dev/tty to see if git is in the foreground process group.
Best Wishes
Phillip
[1] https://www.man7.org/linux/man-pages/man3/tcsetattr.3p.html
-Alex
Environment:
OS: Linux Mint 20
Kernel: 5.4.0-90-generic
Git 2.34.0 from http://ppa.launchpad.net/git-core/ppa/ubuntu
Java: OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)
Ref.:
[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=577358
[2]
https://github.com/git/git/commit/3d411afabc9a96f41d47c07d6af6edda3d29ec92#diff-01b59b6a71e42b9c1251ffbf76a1119b965be087a78538e80e01f9239c8e5880