annoying simple Guile question

Neil Williams linux at codehelp.co.uk
Tue Sep 21 13:20:49 EDT 2004


When running a console application that uses guile via gnucash-env, how do I 
abort?

I free the memory I used, I call gnc_engine_shutdown() but the program hangs, 
waiting for a Ctrl-C. I've checked and all the usual tidying up functions are 
called without errors - it exits normally when allowed to complete the 
program, but if there's an error or if the user simply wants to abort, I 
can't get it to exit.

exit(1); is no help.

I have put error handlers at the start of every function that would be called 
after the abort to cause the function to return if abort is set, no odds.

The code itself has changed many times but this problem has remained since I 
started using it via guile to get access to the file backend to read the 
QofBook data from external files. It's the example code here:
http://code.neil.williamsleesmill.me.uk/example-gncBookMerge.c
(the new home for my code - codehelp doesn't have the space)

(gdb) continue
Continuing.

Program received signal SIGINT, Interrupt.
[Switching to Thread 16384 (LWP 30982)]
0x402b94fd in mallopt () from /lib/libc.so.6
#0  0x402b94fd in mallopt () from /lib/libc.so.6
#1  0x402b8d08 in mallopt () from /lib/libc.so.6
#2  0x402b7ef3 in malloc () from /lib/libc.so.6
#3  0x414ac2ee in operator new () from /usr/lib/libstdc++.so.5
#4  0x414ac41f in operator new[] () from /usr/lib/libstdc++.so.5
#5  0x415cd142 in OpenSP::String<char>::resize () from /usr/lib/libosp.so.4
#6  0x415ccf8c in OpenSP::FileOutputByteStream::flush () 
from /usr/lib/libosp.so.4
#7  0x415ccf09 in OpenSP::FileOutputByteStream::close () 
from /usr/lib/libosp.so.4
#8  0x415ccd40 in OpenSP::FileOutputByteStream::~FileOutputByteStream () 
from /usr/lib/libosp.so.4
#9  0x41583c42 in OpenSP::CmdLineApp::closeFileErrorMessage () 
from /usr/lib/libosp.so.4
#10 0x40272ae2 in exit () from /lib/libc.so.6
#11 0x4010451d in scm_init_guile () from /usr/lib/libguile.so.12
#12 0x4010420b in scm_boot_guile () from /usr/lib/libguile.so.12
#13 0x0804a2da in main_helper (closure=0x1, argc=1077375036, argv=0x4037703c) 
at example-gncBookMerge.c:282
#14 0x4025cdc6 in __libc_start_main () from /lib/libc.so.6
#15 0x08049891 in ?? ()



-- 

Neil Williams
=============
http://www.codehelp.co.uk/
http://www.dclug.org.uk/
http://www.isbn.org.uk/
http://sourceforge.net/projects/isbnsearch/

http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20040921/2b42002d/attachment.bin


More information about the gnucash-devel mailing list