On Fri, Apr 8, 2011 at 11:45 PM, meh. <span dir="ltr"><<a href="mailto:meh@paranoici.org">meh@paranoici.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im">On Fri, Apr 08, 2011 at 11:26:21PM +0200, Juan Jose Garcia-Ripoll wrote:<br>
> On Fri, Apr 8, 2011 at 10:50 PM, meh. <<a href="mailto:meh@paranoici.org">meh@paranoici.org</a>> wrote:<br>
><br>
</div>> >  <<a href="https://github.com/meh/craftd/blob/master/scripting/lisp/helpers.c#L49" target="_blank">https://github.com/meh/craftd/blob/master/scripting/lisp/helpers.c#L49</a>>let's say the eval'd string is<br>


<div class="im">> > (asdf:load-system :craftd) if any of the loaded files have a syntax<br>
> > error my eval function doesn't know something went wrong.<br>
> > Is there a way to know that?<br>
> ><br>
><br>
> This has also been dealt with in the mailing list.<br>
<br>
</div>I've been looking but it's not easy to find something in this huge<br>
archive, could you point me in the right direction please?<br></blockquote><div><br>What you had is a lisp problem, not a C problem. If you want clever error handling, then write it in lisp:<br><a href="http://article.gmane.org/gmane.lisp.ecl.general/4445/match=my+safe+eval">http://article.gmane.org/gmane.lisp.ecl.general/4445/match=my+safe+eval</a><br>

 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">At the moment I do:<br>
<br>
> ecl_import_current_thread(Cnil, Cnil);<br>
<br>
When the thread is created and:<br>
<br>
> ecl_release_current_thread();<br>
<br>
When the thread is going to stop, I still get a segfault in this way.<br clear="all"></blockquote></div><br>Have you tried moving those calls inside  cdcl_EventDispatcher ?<br>From<br><a href="https://github.com/meh/craftd/blob/master/scripting/lisp/main.c">https://github.com/meh/craftd/blob/master/scripting/lisp/main.c</a><br>

I do not really see that those functions are called from the main thread under equal conditions (stack depth, memory, etc). This may perturb the garbage collector.<br><br>Juanjo<br><br>-- <br>Instituto de Física Fundamental, CSIC<br>

c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>