shithub: treason

Download patch

ref: 13eacf92be93ca8dcdbfaec4beeee46507c122ea
parent: 0bd4d710394e8347d0a224e460a3f0119095eab7
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu Sep 10 11:11:35 EDT 2020

fix hanging procs

--- a/stream.c
+++ b/stream.c
@@ -38,8 +38,6 @@
 void
 Sclose(Stream *s)
 {
-	if(s->pid > 0)
-		postnote(PNPROC, s->pid, "interrupt");
 	s->ops.close(s);
 }
 
--- a/stream.h
+++ b/stream.h
@@ -63,7 +63,6 @@
 	void *b;
 	u8int *buf;
 	int bufsz;
-	int pid;
 };
 
 Stream *Sopen(char *filename, int *num);
--- a/stream_mp4.c
+++ b/stream_mp4.c
@@ -16,6 +16,7 @@
 	pipe(p);
 	if((pid = rfork(RFFDG|RFPROC|RFNOMNT)) == 0){
 		close(0);
+		close(p[0]);
 		dup(p[1], 1); close(p[1]);
 		if(!debug){
 			dup(fd = open("/dev/null", OWRITE), 2);
@@ -65,7 +66,7 @@
 			s = streams+ns;
 
 			if(nvideo < 1 && strcmp(v[1], "video") == 0){
-				if((s->pid = mcfs(argv, &sp)) > 0 && ivfopenb(Bfdopen(sp, OREAD), s, failed) == 0){
+				if(mcfs(argv, &sp) > 0 && ivfopenb(Bfdopen(sp, OREAD), s, failed) == 0){
 					nvideo++;
 					ns++;
 				}