waitpid(pid, &ret, 0);
close(fds[1]);
Michał Nazarewicz wrote:
No need to close.
On Fri, 10 Jul 2009 19:40:38 +0200, Glynn Clements
<glynn@xxxxxxxxxxxxxxxxxx> wrote:
There definitely is a need to close, but it should be fclose(stream)
*before* the waitpid(). As David points out, sort won't terminate
until it has finished reading its input.
Yes, yes... David already pointed out the problem is with EOF not
buffering.
--
Best regards, _ _
.o. | Liege of Serenly Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał "mina86" Nazarewicz (o o)
ooo +-<m.nazarewicz@xxxxxxxxxxx>-<mina86@xxxxxxxxxx>-ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html