Charles Lane wrote:
On Sat, 2005-10-22 at 17:02, Craig A. Berry wrote:

At 4:19 PM -0400 10/22/05, John E. Malmberg wrote:


Mailbox size limitations are the culprit; you'd think "oh, just make the
mailboxes really huge", but that runs into the limits of normal "user" accounts. Having Perl run fine for SYSTEM, but fail mysteriously for
JOE_USER, is not something that I wanted.  Even so, one has to increase
the default mbx size to get the testsuite to work; or at least that's
the way it used to be when I was paying more attention to it.   There's
a logical you can set to change the "default" mailbox size that might
be helpful for tracking down if this is the problem.

What I do in bash is I have two mailboxes for each pipe.

An AST drains off the mailbox being written, puts the buffer on a linked list in virtual memory. Another AST tries to drain the virtual memory linked list into a mailbox that is being read. If there ends up with no readers after at least one message from the reading mailbox, then the virtual memory is reclaimed and the mailboxes cleaned up (in simple terms). I also have orphan pipe sanity checks.

I use the one-way mailbox channels that seemed to show up in VMS 5.5-2 and documented a little later which makes it easier to set up the ASTs to clean themselves up when application closes the only channel to the mailbox that it is aware of and all the data is transferred.

So the only limitation is virtual memory for the user process. Mailbox size no longer has any effect.

But that still means that instead of large buffered I/O quota, you now need enough virtual memory to hold everything.

Since Perl also seems to try to keep files in virtual memory, it may be that is not a problem.

So yes, the mailboxes have to be flushed if things get too big. IIRC, I tried to have the mbx i/o be "binmode", i.e., only explicit line terminations, rather than at record boundaries; which works fine if you
have a "cooperating" process at the other end (Perl), but not when it's
a DCL command. What a pain.

I am not seeing this on bash, so I will need to review what I am doing differently. But what I read from one mail box, I write exactly to the partner mailbox eventually.

If one is going revisit the pipe code (a good idea; my work on it stalled for lack of time, not lack of things to do) it would be good to
make use of (and extend) the "Pipe Torture Tests" (at the bottom of
http://www.crinoid.com/perl560.htmlx), which were designed to expose
pipe i/o problems.

I will keep that in mind.

First I need to get ODS-5 VMS and UNIX file handling working, as with out that, the bash shell will not be of much use.

-John
[EMAIL PROTECTED]
Personal Opinion Only

Reply via email to