[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 274 primitiveFileStdioHandles() fails to return nil if stdio file is … (#276)

akgrant43 notifications at github.com
Sun Aug 12 05:31:06 UTC 2018


…not available

According to the comment for primitiveFileStdioHandles():

Answer an Array of file handles for standard in, standard out and
standard error, with nil in entries that are unvailable, e.g. because
the platform does not provide standard error, etc.

However, on Windows in practice an array of sqFile entries with null
handles is returned. The image is unable to distinguish between valid
and invalid entries since sqFile is private to the VM.

- Modify sqWin32FilePrims.c() to set the valid mask correctly.
- Modify primitiveFileStdioHandles() to treat a mask of 0 as
  successfully determining that no stdio is available (a normal case
  on Windows).
  A validMask of -1 is treated as an error.
- Update comments to reflect changed behaviour
You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/276

-- Commit Summary --

  * 274 primitiveFileStdioHandles() fails to return nil if stdio file is not available

-- File Changes --

    M platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c (12)
    M platforms/RiscOS/plugins/FilePlugin/sqFilePluginBasicPrims.c (11)
    M platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c (31)
    M src/plugins/FilePlugin/FilePlugin.c (28)

-- Patch Links --

https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/276.patch
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/276.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/276
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180811/935ddf2c/attachment.html>


More information about the Vm-dev mailing list