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

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/529'>https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/529</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Fix image opening on unix</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/529/files#diff-b54a4e3a13ef8ebb1c82f3bce4d6930c230813fe76f3e998851746f332be0a62">platforms/unix/vm/sqUnixMain.c</a>
    (12)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/529.patch'>https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/529.patch</a></li>
  <li><a href='https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/529.diff'>https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/529.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/529">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEW4JQ2JUS45UEE7XVWDSLSYFVANCNFSM4SWZGHUQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AIJPEWZWQULEORTNE54XES3SLSYFVA5CNFSM4SWZGHU2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KZWU5LA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/529",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/529",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>