mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
htmlroff: fix tcs pipe leak
This commit is contained in:
parent
8d0702ad19
commit
ddfbf28cd4
1 changed files with 3 additions and 2 deletions
|
@ -33,14 +33,15 @@ rune2html(Rune r)
|
|||
sysfatal("fork: %r");
|
||||
case 0:
|
||||
dup(p[0], 0);
|
||||
dup(p[1], 1);
|
||||
dup(p[0], 1);
|
||||
close(p[0]);
|
||||
close(p[1]);
|
||||
execl("/bin/tcs", "tcs", "-t", "html", nil);
|
||||
_exits(0);
|
||||
default:
|
||||
close(p[0]);
|
||||
fd = p[1];
|
||||
Binit(&b, p[0], OREAD);
|
||||
Binit(&b, fd, OREAD);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue