[OpenSmalltalk/opensmalltalk-vm] 10cb9a: Fix image opening on unix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] 10cb9a: Fix image opening on unix

Eliot Miranda-3
 
  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 10cb9a759566159c7f38c56bc0c2535875985132
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/10cb9a759566159c7f38c56bc0c2535875985132
  Author: Levente Uzonyi <[hidden email]>
  Date:   2020-10-19 (Mon, 19 Oct 2020)

  Changed paths:
    M platforms/unix/vm/sqUnixMain.c

  Log Message:
  -----------
  Fix image opening on unix

In imgInit() of sqUnixMain.c
- preserve fd instead of throwing it away
- use fileno() to get the file descriptor (fd) created by fopen() instead of
  opening the file again with open() (which leaked a file descriptor due to
  lack of close())
- pass the file descriptor fd instead of the FILE* f to the recently changed
  methods expecting a file descriptor, e.g. readImageFromFileHeapSizeStartingAt()


  Commit: de8df0c4e692a4869456b4c6814339d7b86bc33e
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/de8df0c4e692a4869456b4c6814339d7b86bc33e
  Author: Eliot Miranda <[hidden email]>
  Date:   2020-10-19 (Mon, 19 Oct 2020)

  Changed paths:
    M platforms/unix/vm/sqUnixMain.c

  Log Message:
  -----------
  Merge pull request #529 from smalltalking/Cog

Fix image opening on unix


Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/aafb3941fed5...de8df0c4e692