DCE-RPC, pthreads and ESQL-C
Posted in 1998
Hi there, I've a problem concerning the interaction between DCE-RPC, pthreads and ESQL-C. We employ DCE clients and servers which communicate via RPC. The RPCs on the server side (aka manager code) do access an informix database via ESQL-C code. So far so good. The client issues an rpc via a pthread. The RPC is forwarded to the server whitch in turn accesses the database (with EXEC SQL DATABASE, EXEC SQL SELECT ..., EXEC SQL CLOSE). The client is able to cancel the thread and a signal is forwarded to the server to cancel the pending rpc. The manager code of the server catches a signal to break further processing: code fragment of server manager code: #include <dce/pthread_etc.h> #include <informix_stuff_and_thinks_like_that> my_routine(/* List of Parameters */) { . . . . TRY { /* make the SQL request to the * database */ EXEC SQL DATABASE... EXEC SQL SELECT... EXEC SQL CLOSE... } CATCH(pthread_cancel_e) { if (sqldone() == -439) // server busy ???, yes: cancel pending request sqlbreak(); } ENDTRY } The signal is catched well and the code between CATCH and ENDTRY is executed well (sqlbreak() returns normally 0 which means, that the current request has been canceled). The problem is that subsequent rpc calls to the database (means any SQL statement between TRY and CATCH) always return with code -439 (database is currently processing an sql task). It seems that the SQL statement sqlbreak() has not made a break correctly (althought it reported so). What I am doing wrong or what has to be done in addition to get the things done ? Now, the server has to be shutdown and started again. But this is no solution in the long run... We currently use DCE 1.0.3a and Informix (SINIX) 7.11/7.13... If anyone could be of further assistance please let me know. Any help is highly appreciated. Thanks in advance -- johannes ********************************** Johannes Plassmann c/o Siemens Nixdorf Informationssysteme AG SNI ITS LOG RC61 Heinz-Nixdorf-Ring 33106 Paderborn, Germany Phone: +49 5251 8-25825 Fax: +49 5251 8-27199 NERV: plassmann.pad Internet: plassmann.pad@sni.de