On Fri, Apr 8, 2011 at 11:45 PM, meh. <m...@paranoici.org> wrote:
> On Fri, Apr 08, 2011 at 11:26:21PM +0200, Juan Jose Garcia-Ripoll wrote:
> > On Fri, Apr 8, 2011 at 10:50 PM, meh. <m...@paranoici.org> wrote:
> >
> > > <
> https://github.com/meh/craftd/blob/master/scripting/lisp/helpers.c#L49>let's
> say the eval'd string is
> > > (asdf:load-system :craftd) if any of the loaded files have a syntax
> > > error my eval function doesn't know something went wrong.
> > > Is there a way to know that?
> > >
> >
> > This has also been dealt with in the mailing list.
>
> I've been looking but it's not easy to find something in this huge
> archive, could you point me in the right direction please?
>
What you had is a lisp problem, not a C problem. If you want clever error
handling, then write it in lisp:
http://article.gmane.org/gmane.lisp.ecl.general/4445/match=my+safe+eval
> At the moment I do:
>
> > ecl_import_current_thread(Cnil, Cnil);
>
> When the thread is created and:
>
> > ecl_release_current_thread();
>
> When the thread is going to stop, I still get a segfault in this way.
>
Have you tried moving those calls inside cdcl_EventDispatcher ?
From
https://github.com/meh/craftd/blob/master/scripting/lisp/main.c
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.
Juanjo
--
Instituto de FĂsica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list