Groups > Novell > MySQL with Novell > SIGINT and mysql_close




SIGINT and mysql_close

SIGINT and mysql_close
Wed, 29 Nov 2006 00:58:53 GMT
Hi all,
I have an app, written in C, which uses mysql client to talk to a mysql DB. One
of the requirements is to catch SIGINT and make sure the app shuts down
gracefully - which means I need to call mysql_close() from within the signal
handler. 
When I try to do this, the signal handler seems to enter an infinite loop
(something in mysql_close seems to emit the signal again). Im not entirely clear
whats happening. 
Any suggestions on how to handle this. Is there a graceful way to terminate
mysql connection on SIGINT/SIGQUIT.

Thanks,
Praveen
 
----
I'll be more enthusiastic about encouraging thinking outside the box when
there's evidence of any thinking going on inside it.
  - Terry Pratchett




 
________________________________________________________________________________
____
Want to start your own business?
Learn how on Yahoo! Small Business.
Post Reply
about | contact