Hi,
I’m having strange (catastrophic) problems trying to develop a shared object on linux RH 8.0 which gets called in HTTP agent trough LS.
First some background:
testlib.c
#include <unistd.h>
#include <fcntl.h>
extern “C” {
int testfunc() {
int fd = creat(“/tmp/testlib-output.txt”, 0600);
try {
write(fd, "throwing...\n\r", 13);
throw 0;
}
catch (…) {
write(fd, "catched!\n\r", 10);
}
close(fd);
return 0;
}
} //extern “C”
compiled & linked:
g++ -c -g -fPIC testlib.c -o testlib.o
g++ -o testlib.so -g -shared -Wl,-soname,testlib.so testlib.o
Agent:
(Declaration)
Declare Function testfunc Lib “/lib/testlib.so” () As Long
Initialize
Sub Initialize
Dim rc As Long
rc = testfunc()
End Sub
Agent can be called several times or just once. When i try to shutdown HTTP task or complete domino, HTTP crashes.
I’ve tried to solve this using different methods, but as soon i use internal exception handling (throw/catch), HTTP stack gets messed up. I’ve looked at NDS dumps but no luck so far.
Can someone (maybe from iris) confirm my problems to be real so i can look further into my code and not blame domino for this one. I’m slowly loosing my patience. I would really not like use gdb to attach to http task and step over every step to find out where the problem is.
Thanks
Jure
Imaging Systems