Re: ESQL/C: sqlsignal() Question
Posted in 1997
>From: Stefan <stefan@weideneder.de> >Date: Wed, 11 Jun 1997 10:20:42 +0200 >X-Informix-List-Id: <news.39034> > >Rajendra Singh (raj@innocent.com) wrote: >> What types of applications should use this function? Should I use >> this function in all my programs or just those programs which fork() >> new processes? > >I think you should use this function, if you want to catch signals >while the communication functions receive some data from the >back-end. Reading the 7.2 ESQL/C Manual, it says: The sqlsignal() function enables, disables, or reenables signal handling of the signals that the ESQL/C library handles. ... Usage The sqlsignal() function currently provides handling only for the SIGCHLD signal. In some instances, defunct child processes remain after the application ends. ... This behaviour is only apparent when the application uses pipes for client-server communication (that is, the nettype field of the sqlhosts file is ipcpip). You do not need to call sqlsignal() for other communication mechanisms (for example, a nettype of tlitcp). >I realy don't know, how Informix implemented the communication >part, but they must either ignore signals during the read >operation, or they have to handle incoming signals. >( see also your UNIX manual: function "read()" and >what will happen if you catch a signal during a read operation ). >That's why I think you should use the sqlsignal() function >not only in child processes, but also in your parent process. That's why I think that you don't need to use sqlsignal() unless you have a clear understanding of why you need to use it. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>