Closed vegesm closed 5 years ago
Hmm, I git clone all the time and haven't seen this. What OS are you running on the server?
It's ubuntu 16.04, kernel: 4.4.0-141-generic
Is this a home machine or are you using a public cloud? It sounds like some SELinux restrictions
It is a workplace computer, SElinux is turned off but I run etserver in user space.
I did a bit of digging around and it seems the main culprit is that ET somehow disables SIGCHLD. When running trap in et:
$ trap
trap -- '' SIGCHLD
trap -- '' SIGTSTP
trap -- '' SIGTTIN
trap -- '' SIGTTOU
In ssh:
$ trap
trap -- '' SIGTSTP
trap -- '' SIGTTIN
trap -- '' SIGTTOU
According to strace git uses clone and wait4 to fork a subprocess and wait for it to finish. If the SIGCHLD handler is set to ignore then wait4 reports ECHILD (link). If I run the following code, everything works fine:
#include <unistd.h>
#include <signal.h>
int main()
{
signal(SIGCHLD, SIG_DFL); // Reset SIGCHLD handler to default
execl("/usr/bin/git", "git", "clone", "path_to_repo", (char*)NULL);
return 0;
}
Interestingly, in ET trap
does not work on SIGCHLD, whatever I try, the SIGCHLD action is always ignore. Using ssh, I can change the signal action without any problem.
etserver should run in root mode.
Tried it with sudo, no change. I'm not sure etserver has anything to do with this as the remote shell is started by etterminal which in turn is started by the local client through ssh.
Anyway, I created a workaround by calling the above C program with bash in .profile.
I also have this issue. At first I didn't imagine et could be the culprit but I tried over SSH instead which worked, and the issue resurfaced when I switched back to et.
Maybe you can find some clues on how to fix it by looking at how tmux fixed a similar issue in the past: https://github.com/tmux/tmux/issues/1007
This should be fixed in et 6. Please re-open if it isn't.
Git clone fails when running from et:
The same witpid error is raised when trying to commit. Using normal ssh, everything work fine. My et version is 5.1.9