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.
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.
--
Drexel University \V --Chuck Lane
======]---------->--------*------------<-------[===========
(215) 895-1545 _/ \ Particle Physics
FAX: (215) 895-5934 /\ /~~~~~~~~~~~ [EMAIL PROTECTED]