shithub: zuke

Download patch

ref: 80f1401b7c81f625ddfd96de06abe97d6058ae66
parent: 8918e063e13505119fedd10fe2cdf91c8f814e4a
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Feb 22 13:53:41 EST 2016

,s/kill/interrupt/g; just closemouse and closekeyboard

--- a/zuke.c
+++ b/zuke.c
@@ -230,8 +230,8 @@
 		cover = readimage(display, p2[1], 0);
 		redraw(screen, 1);
 	}
-	postnote(PNGROUP, pid, "kill");
-	postnote(PNGROUP, pid2, "kill");
+	postnote(PNGROUP, pid, "interrupt");
+	postnote(PNGROUP, pid2, "interrupt");
 	close(p2[1]);
 	closeioproc(io);
 }
@@ -287,7 +287,7 @@
 	pcurplaying = player->pcur;
 	if(c != Cbackward)
 		redraw(screen, 1);
-	//proccreate(coverload, &pl[pcurplaying], 4096);
+	/*proccreate(coverload, &pl[pcurplaying], 4096);*/
 
 	io = ioproc();
 	while(1){
@@ -329,7 +329,8 @@
 
 	if(n == 0){ /* seeking backwards or end of the song */
 		close(p[1]);
-		postnote(PNGROUP, pid, "kill");
+		postnote(PNGROUP, pid, "interrupt");
+		waitpid();
 		if(c != Cbackward){
 			bytesfrom = 0;
 			player->pcur++;
@@ -340,7 +341,8 @@
 stop:
 	closeioproc(io);
 	close(p[1]);
-	postnote(PNGROUP, pid, "kill");
+	postnote(PNGROUP, pid, "interrupt");
+	waitpid();
 	free(buf);
 }
 
@@ -700,8 +702,5 @@
 end:
 	closemouse(mctl);
 	closekeyboard(kctl);
-	chanclose(a[0].c);
-	chanclose(a[1].c);
-	chanclose(a[2].c);
 	threadexitsall(nil);
 }