~ft/zuke

e11985de50aca2b6a958b336e6ccbf209871325b — Sigrid Haflínudóttir 6 months ago e54644a
close audio in picker proc since we're forking with RFFDG
2 files changed, 5 insertions(+), 3 deletions(-)

M theme.c
M zuke.c
M theme.c => theme.c +4 -2
@@ 34,6 34,7 @@ runpicker(void *x)
	p = x;
	dup(*p, 0); dup(*p, 1); close(*p);
	close(p[1]);
	close(p[2]);
	dup(f = open("/dev/null", OWRITE), 2); close(f);
	execl("/bin/picker", "picker", nil);



@@ 41,14 42,15 @@ runpicker(void *x)
}

static void
themeproc(void *)
themeproc(void *audio)
{
	Biobuf *b;
	char *s, *v[3];
	int p[2], n, i;
	int p[3], n, i;

	threadsetname("themeproc");
	pipe(p);
	p[2] = *(int*)audio;
	procrfork(runpicker, p, 4096, RFFDG|RFNAMEG);
	close(p[0]);
	b = Bfdopen(p[1], OREAD);

M zuke.c => zuke.c +1 -1
@@ 967,7 967,7 @@ ev:
			if(m.buttons == 4){
				n = menuhit(3, mctl, &menu3, nil);
				if(n == 0)
					procrfork(themeproc, nil, 4096, RFNOTEG);
					procrfork(themeproc, &audio, 4096, RFNOTEG);
				else if(n == 1)
					goto end;
				goto ev;