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

Eliot Miranda noreply at github.com
Mon Oct 19 22:15:53 UTC 2020


  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 10cb9a759566159c7f38c56bc0c2535875985132
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/10cb9a759566159c7f38c56bc0c2535875985132
  Author: Levente Uzonyi <leves at caesar.elte.hu>
  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 <eliot.miranda at gmail.com>
  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


More information about the Vm-dev mailing list