All right, I figured out that it works correctly when argv[0] is set to "./aplusb". I have a different question though: is there any feature that allows one to limit the amount of memory that a compiled program is allowed to use, similar to the "Limit Memory" command in DrRacket?<br>
<br><div class="gmail_quote">On Fri, Sep 17, 2010 at 4:32 AM, bbi5291 <span dir="ltr"><<a href="mailto:bbi5291@gmail.com">bbi5291@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Consider the simple Racket program<br><br>--------------------<br>#lang racket<br>(+ (read) (read))<br>--------------------<br><br>When this is compiled using raco, the executable produced works exactly as intended, reading two integers on standard input and printing their sum. However, when I run the C program<br>
<br>--------------------<br>#include <unistd.h><br>int main()<br>{<br> execl("aplusb","aplusb",(char*)0);<br>}<br>--------------------<br><br>where "aplusb" is the name of the Racket program, it exits immediately with the errors:<br>
<br>--------------------<br>with-input-from-file: expects type <path or string> as 1st argument, given: #f; other arguments were: #<procedure><br><br> === context ===<br>embedded-load<br><br>--------------------<br>
<br>How can I fix this problem? I am using Racket v5.0.1 on Ubuntu 9.10 (i386).<br>
</blockquote></div><br>