At 09:40 AM 4/30/2001 -0400, Charles Lane wrote:
>Dan Sugalski <[EMAIL PROTECTED]> writes:
> > At 09:24 AM 4/30/2001 -0400, [EMAIL PROTECTED] wrote:
> > >"Craig A. Berry" <[EMAIL PROTECTED]> writes:
> >> > I think this is a reproducer for the problem that occasionally
> >> > inserts spurious carriage returns into what should be one line of
> >> > output in the test suite. It appears to be a function of pipe buffer
> >> > size. If the mailbox buffer for a pipe fills up, reading EOF from
> >> > the pipe causes a carriage return to get inserted in the stream.
> > >
> > >Well, much of this is from the interaction between the CRTL and
> > >mailboxes. There's a limit to what we can do to wedge our fixes in
> > >between those two. There's a definite limit to what I'm willing to do
> > >to rewrite the CRTL i/o library.
>
> > Would it be better, then, to drop to $QIO calls for this then? We could
> > wedge that in reasonably easily, as we do have a goodly amount of control
> > at this level.
>
>Yes, we'd want to use $QIO's...but that alone won't help much. My
>example again:
>
>CHILD.COM:
>
> $ write sys$output "this is a test"
> $ perl -e "print qq(a test\nreally\n);" ! q or qq? I can never
> recall
>
>The DCL write just puts "this is a test" in the mailbox, no \n to strip.
>But when the parent reads from the mailbox, I think you'll agree that adding
>a \n before handing it to Perl is in order.
Maybe. I do hate treating an I/O channel as both record and stream
oriented. Bleah.
>Should the Perl print strip the trailing \n or not before it goes in the
>mailbox? Well, yes, if it will go through the same interpretation at the
>parent as the DCL write does. And the parent has no clue which bit of
>data comes from which source.
I'd argue that perl should actually split the data on whatever's in PL_ors
and post it to the mailbox piece by piece that way, but that still has the
problem of sending arbitrary streams of unstructured data down a stream
that wants structured data.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk