Hi Dave,

On 12 May 2018 at 01:28, David T. Lewis <[email protected]> wrote:
> Hi Alistair,
>
> On Fri, May 11, 2018 at 03:09:20PM +0200, Alistair Grant wrote:
>> Hi Dave,
>>
>> ...
>>
>> Are the two primitives that were added to the VM a couple of months
>> ago (primitiveConnectToFileDescriptor & primitiveConnectToFile) enough
>> to allow AttachableFileStream to be removed?
>
> No, I was referring only to the actual file stream hierarchy. Long ago,
> I tapped into StandardFileStream with some subclasses that do useful things
> for OSProcess. That is clearly a hack, and I'm sure we could do better.
> Having said that, I have not looked at Pharo 7 yet so maybe I don't know
> what I'm talking about ;-)

The two primitives aren't Pharo specific - although I don't think the
primitive methods have been added to Squeak yet:

primitiveConnectToFileDescriptor takes a posix file descriptor
(integer) and returns a file handle (SQFile byte array).

primitiveConnectToFile takes a posix FILE* pointer (byte array size
FILE*) and returns a file handle (SQFile byte array).

I suspect that AttachableFileStream does something else since it looks
like #name:attachTo:writable: takes a SQFile byte array (I have to
admit to not looking very carefully).

Cheers,
Alistair

Reply via email to