[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch]spawn-pipe.c / spawni.c compile on OpenVMS.

From: John E. Malmberg
Subject: Re: [patch]spawn-pipe.c / spawni.c compile on OpenVMS.
Date: Mon, 3 Jul 2017 21:14:17 -0500
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 7/3/2017 7:26 PM, Bruno Haible wrote:
John E. Malmberg wrote:
For Bash and Coreutils, I have a close to a pipe replacement that uses a
slightly different API in that you have to know if the pipe is parent to
child or child to parent when you create the pipes.  This handles pipes
up to the amount of virtual memory available to the process.

You mean, such an implementation will not be usable for the case when
   1. parent process calls pipe()
   2. parent process forks child process 1,
   3. parent process forks child process 2,
   4. parent closes its copies of the fds from the pipe() call
because in this case the communication happens between two sibling processes?

Pretty much. I had not considered that case because I did not need it for Bash.

Since OpenVMS has to vfork()/exec() children and not just fork() them, specifying the fds to the child can also have its own special fun so porting such a pattern might not be simple.

I agree that many uses of pipe() are for parent-child communication.
Does someone know how frequent the use of pipe() for sibling processes is?

Not me.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]