~martanne/dvtm

5873875d40e55592ebb41eb7c27d58e223ee80ef — Marc AndrĂ© Tanner 3 years ago 6517e14 + e23a7e6
Merge branch 'fixsigpipe' of https://github.com/luke-clifton/dvtm
1 files changed, 7 insertions(+), 0 deletions(-)

M vt.c
M vt.c => vt.c +7 -0
@@ 1635,6 1635,13 @@ pid_t vt_forkpty(Vt *t, const char *p, const char *argv[], const char *cwd, cons
		if (cwd)
			chdir(cwd);

		struct sigaction sa;
		memset(&sa, 0, sizeof sa);
		sa.sa_flags = 0;
		sigemptyset(&sa.sa_mask);
		sa.sa_handler = SIG_DFL;
		sigaction(SIGPIPE, &sa, NULL);

		execvp(p, (char *const *)argv);
		fprintf(stderr, "\nexecv() failed.\nCommand: '%s'\n", argv[0]);
		exit(1);