Back out revision 1.34; the problem lies elsewhere.
This commit is contained in:
3
script.c
3
script.c
@@ -647,14 +647,11 @@ script_child(path, argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Flush any remaining output to stdout (already updated output file). */
|
/* Flush any remaining output to stdout (already updated output file). */
|
||||||
#if 0
|
|
||||||
/* XXX - this can cause us to hang trying to exit */
|
|
||||||
n = fcntl(STDOUT_FILENO, F_GETFL, 0);
|
n = fcntl(STDOUT_FILENO, F_GETFL, 0);
|
||||||
if (n != -1) {
|
if (n != -1) {
|
||||||
n &= ~O_NONBLOCK;
|
n &= ~O_NONBLOCK;
|
||||||
(void) fcntl(STDOUT_FILENO, F_SETFL, n);
|
(void) fcntl(STDOUT_FILENO, F_SETFL, n);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
while (output.len > output.off) {
|
while (output.len > output.off) {
|
||||||
n = write(STDOUT_FILENO, output.buf + output.off,
|
n = write(STDOUT_FILENO, output.buf + output.off,
|
||||||
output.len - output.off);
|
output.len - output.off);
|
||||||
|
Reference in New Issue
Block a user