History

fix hanging procs

Sigrid Haflínudóttir committed 6 years ago

Commit 13eacf91 parent 0bd4d713 files · +2 −4Browse files

Unified · Split

3 files
  1. stream.c +0 −2
  2. stream.h +0 −1
  3. stream_mp4.c +2 −1
stream.c+0−2
@@ -38,8 +38,6 @@ Sopen(char *filename, int *num) · 37 unmodified lines
3838 void
3939 Sclose(Stream *s)
4040 {
41− if(s->pid > 0)
42− postnote(PNPROC, s->pid, "interrupt");
4341 s->ops.close(s);
4442 }
4543
stream.h+0−1
@@ -63,7 +63,6 @@ struct Stream { · 62 unmodified lines
6363 void *b;
6464 u8int *buf;
6565 int bufsz;
66− int pid;
6766 };
6867
6968 Stream *Sopen(char *filename, int *num);
stream_mp4.c+2−1
@@ -16,6 +16,7 @@ mcfs(char **argv, int *pipefd) · 15 unmodified lines
1616 pipe(p);
1717 if((pid = rfork(RFFDG|RFPROC|RFNOMNT)) == 0){
1818 close(0);
19+ close(p[0]);
1920 dup(p[1], 1); close(p[1]);
2021 if(!debug){
2122 dup(fd = open("/dev/null", OWRITE), 2);
@@ -65,7 +66,7 @@ mp4open(char *filename, int *num, int *failed) · 43 unmodified lines
6566 s = streams+ns;
6667
6768 if(nvideo < 1 && strcmp(v[1], "video") == 0){
68− if((s->pid = mcfs(argv, &sp)) > 0 && ivfopenb(Bfdopen(sp, OREAD), s, failed) == 0){
69+ if(mcfs(argv, &sp) > 0 && ivfopenb(Bfdopen(sp, OREAD), s, failed) == 0){
6970 nvideo++;
7071 ns++;
7172 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t