~ft/nvi

785d0c9f871d6d89d551ffb2184937264c6eec1f — Sigrid Solveig Haflínudóttir 2 years ago b7306be
pexec: instead of closing stderr, redirect it to /dev/null
1 files changed, 5 insertions(+), 2 deletions(-)

M util.c
M util.c => util.c +5 -2
@@ 23,6 23,7 @@ static void
pexec(void *args)
{
	Exec *e = args;
	int fd;

	if(e->p[0] >= 0){
		dup(e->p[Them], 0);


@@ 33,8 34,10 @@ pexec(void *args)
		close(0);
		close(1);
	}
	if(debug < 1)
		close(2);
	if(debug < 1){
		dup(fd = open("/dev/null", OWRITE), 2);
		close(fd);
	}
	procexec(e->pid, e->file, e->argv);
}