8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00

front-ported doc changes

This commit is contained in:
alexpeshkoff 2011-01-11 07:49:22 +00:00
parent 9dbdcbbbd2
commit 19e35a5192

View File

@ -40,9 +40,11 @@ place during shutdown. You should consult firebird.log for more information.
fb_shutdown_callback() setups callback function, which will be called during shutdown. It has 4
parameters - status vector, pointer to callback function, call mask and argumnet to be passed
to callback function. Call mask can have the following values:
fb_shut_confirmation - callback function may return non-zero value to abort shutdown
fb_shut_preproviders - callback function will be called before shutting down engine
fb_shut_postproviders - callback function will be called after shutting down engine
or ORed combination of them (to make same function be called in both cases).
fb_shut_finish - final step, callback function may wait for some activity to be treminated
or ORed combination of them (to make same function be called in required cases).
Callback function has 3 parameters - reason of shutdown, actual value of mask with which it was
called and argument passed by user to fb_shutdown_callback(). There are 2 specially interesting
@ -55,11 +57,10 @@ First and second parameters help you decide what action to be taken in your call
be used for any purporse you like and may be NULL.
Zero return value of callback function means it performed it's job OK, non-zero is interpreted
depending upon call mask. For fb_shut_postproviders calls it means some errors took place, and
non-zero value will be returned from fb_shutdown(). It's callback function responsibility to
notify world about exact reasons of error return. For fb_shut_preproviders non-zero means that
shutdown will not be performed. It's bad idea to return non-zero if shutdown is due to exit()
called.
depending upon call mask. For fb_shut_confirmation non-zero means that shutdown will not be
performed. It's bad idea to return non-zero if shutdown is due to exit() called. In all other cases
it means some errors took place, and non-zero value will be returned from fb_shutdown(). It's
callback function's responsibility to notify world about exact reasons of error return.
fb_shutdown_callback() almost always returns successfully, though in some cases (out of memory
for example) it can return error.
@ -77,7 +78,7 @@ static int ignoreCtrlC(const int reason, const int, void*)
int main(int argc, char *argv[])
{
ISC_STATUS_ARRAY status;
if (fb_shutdown_callback(status, ignoreCtrlC, fb_shut_preproviders, 0))
if (fb_shutdown_callback(status, ignoreCtrlC, fb_shut_confirmation, 0))
{
isc_print_status(status);
return 1;