scsh-hackers
[Top] [All Lists]

Re: C extension problems

To: Michael Sperber <sperber@informatik.uni-tuebingen.de>
Subject: Re: C extension problems
From: Kristof Bastiaensen <kristof@vleeuwen.org>
Date: Tue, 27 Dec 2005 13:58:03 +0100
Cc: scsh-hackers@scsh.net
List-id: Discussion among the implementors <scsh-hackers.list-id.scsh.net>
At Tue, 27 Dec 2005 08:15:43 +0100,
Michael Sperber wrote:
> 
> 
> Kristof Bastiaensen <kristof@vleeuwen.org> writes:
> 
> > I have written an extension for the sqlite3 database.  It currently
> > works with scheme48, but it doesn't work with scsh.  When I enter
> > (open-database "/tmp/existing.db"), the interpreter hangs.  One guess
> > is that it has something to do with threads, since the sqlite3 API
> > says that the handle returned by sqlite3_open may not be passed to
> > another thread.  Of course it could be another problem.
> 
> Neither Scheme 48 nor scsh use system-level threads, so that's not
> it.  Could you give some more information about the symptoms, i.e. if
> you can interrupt the hang with Control-C, backtrace, or some such?
>

Sure.  All keystrokes are shown at the terminal, but scsh doesn't
react to them.  Control-C or Control-Z doesn't work, the only way I
can terminate the application is by sending a KILL signal to scshvm.
Strangly when running scsh in gdb the problem disappears.  Also the
problem only occurs when the database is opened or created.  If the
filepath is illegal an error is signalled, but the application doesn't
hang.  Sometimes the call to (open-database db) succeeds but scsh
hangs after typing ,exit.

Kristof

<Prev in Thread] Current Thread [Next in Thread>