[squeak-dev] ExternalPipe atEnd test

Alistair Grant akgrant0710 at gmail.com
Thu Apr 12 07:10:45 UTC 2018


If you reverse the test there is a window where data may be written to the
pipe between the two tests, and the data is subsequently lost.

Cheers,
Alistair
(on phone)

On Thu., 12 Apr. 2018, 09:04 K K Subbu, <kksubbu.ml at gmail.com> wrote:

> Hi,
>
> I stumbled upon the following method in OSProcess-Base package:
>
> ExternalPipe#atEnd
>
>   ^writer closed and: [self peek == nil]
>
> Shouldn't the test be reversed? In a pipe, the reader's peek buffer
> could be holding an object while the writer has closed its end.
>
> Regards .. Subbu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20180412/c829595c/attachment.html>


More information about the Squeak-dev mailing list