On Tue, 23 Feb 2010 11:49:40 +0100, Marc Weber <[email protected]> wrote:
> It should start a sub process and talk to it using pipes. > When sending input has finished it should close stdin of the subprocess > causing it to quit. It doesn't quit. Neither does stdin close. > What am I doing wrong here? You're not closing the pipes in the parent process. You need to close pipe_in[0] and pipe_out[1] in the parent. In fact, since you fork the parent into a second child to read the output from the first child and maintain the parent to write to the first child you need to close the unwanted ends of the pipes in /both/ those processes. You should end up with only pipe_in[1] open in the parent and only pipe_out[0] open in the second child. (Unless I got confused.) -- Matthew Winn -- You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php
