Properly wait for spawned processes to end
This commit is contained in:
parent
76b3ca0d33
commit
791a08363a
|
@ -111,16 +111,21 @@ class Page {
|
|||
pandoc.stdin.writeln();
|
||||
pandoc.stdin.flush();
|
||||
pandoc.stdin.close();
|
||||
pandoc.pid.wait();
|
||||
string result;
|
||||
string line;
|
||||
while ((line = pandoc.stdout.readln()) !is null) {
|
||||
result ~= line;
|
||||
debug {
|
||||
logf("Pandoc stdout: %s", line);
|
||||
}
|
||||
}
|
||||
|
||||
while ((line = pandoc.stderr.readln()) !is null) {
|
||||
debug {
|
||||
logf("Pandoc stderr: %s", line);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue