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
38void38void
39Sclose(Stream *s)39Sclose(Stream *s)
40{40{
41 if(s->pid > 0)
42 postnote(PNPROC, s->pid, "interrupt");
43 s->ops.close(s);41 s->ops.close(s);
44}42}
45 43
stream.h+0−1
@@ -63,7 +63,6 @@ struct Stream { · 62 unmodified lines
63 void *b;63 void *b;
64 u8int *buf;64 u8int *buf;
65 int bufsz;65 int bufsz;
66 int pid;
67};66};
68 67
69Stream *Sopen(char *filename, int *num);68Stream *Sopen(char *filename, int *num);
stream_mp4.c+2−1
@@ -16,6 +16,7 @@ mcfs(char **argv, int *pipefd) · 15 unmodified lines
16 pipe(p);16 pipe(p);
17 if((pid = rfork(RFFDG|RFPROC|RFNOMNT)) == 0){17 if((pid = rfork(RFFDG|RFPROC|RFNOMNT)) == 0){
18 close(0);18 close(0);
19 close(p[0]);
19 dup(p[1], 1); close(p[1]);20 dup(p[1], 1); close(p[1]);
20 if(!debug){21 if(!debug){
21 dup(fd = open("/dev/null", OWRITE), 2);22 dup(fd = open("/dev/null", OWRITE), 2);
@@ -65,7 +66,7 @@ mp4open(char *filename, int *num, int *failed) · 43 unmodified lines
65 s = streams+ns;66 s = streams+ns;
66 67
67 if(nvideo < 1 && strcmp(v[1], "video") == 0){68 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){
69 nvideo++;70 nvideo++;
70 ns++;71 ns++;
71 }72 }

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