Ah, you&#39;re right. The Squeak VM gets the file size via stat and does not just read the contents from the file. So for squeak the file looks just empty.<br>That&#39;s a shame because /proc/self/environ would be an easy way to access the environment variables from within the image without any need to add a specific primitive to the VM or use FFI.<br>

<br>Alex<br><br><div class="gmail_quote">2011/2/21 Tony Garnock-Jones <span dir="ltr">&lt;<a href="mailto:tonyg@ccs.neu.edu" target="_blank">tonyg@ccs.neu.edu</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div>On 2011-02-21 4:35 PM, Alexander Lazarević wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Does anybody know why the linux vm can&#39;t read files from the /proc<br>
filesystem? The VM is able to open the files but the size is 0!? A<br>
simple less or cat on these files just works fine ...<br>
</blockquote>
<br></div></div>
Is it just the sizes that are zero, or does actually reading from them fail too? A stat() (or for that matter an ls -l) will return a zero size, but a read() in C will return data.<br>
<br>
Regards,<br><font color="#888888">
  Tony<br>
</font></blockquote></div><br>