Re: Help on pipe

Michał Nazarewicz <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
>>>     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  
<[email protected]> 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 +-<[email protected]>-<[email protected]>-ooO--(_)--Ooo--

--
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.