[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch]spawn-pipe.c / spawni.c compile on OpenVMS.
From: |
Bruno Haible |
Subject: |
Re: [patch]spawn-pipe.c / spawni.c compile on OpenVMS. |
Date: |
Tue, 04 Jul 2017 02:58:03 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-81-generic; KDE/5.18.0; x86_64; ; ) |
John E. Malmberg wrote:
> The OpenVMS Mailboxes work for data up to about 65K and then have buffer
> full problems.
> ...
> 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.
The point of pipes on Unix is that the buffer size is limited (to 4 KB
usually, nowadays), and that the writer blocks when the reader is not
reading fast enough. You have to
1. make the writer block when it recognizes that the buffer is nearly
full,
2. make the reader notify (wake up) the writer when it has read a significant
amount of data from the buffer. (How? You know the interprocess
communication facilities of OpenVMS better than me.)
Bruno