navigator_extend_terminate()

Extend the time allowed for the application to exit before it is forcibly terminated.

Synopsis:

#include <bps/navigator.h>
 
BPS_API int navigator_extend_terminate(void)

Since:

BlackBerry 10.0.0

Arguments:

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

The navigator_extend_terminate() function sends a navigator extendTerminate request to extend the time allowed for the application to exit before it is forcibly terminated. Normally, the application gets 3 seconds after receiving a NAVIGATOR_EXIT message to exit properly. If the application requires more than this amount of time, it should call this function to get additional time. Each time this function is called, the application will receive another 2 seconds before it is terminated. This function can be called in a loop during the exit cleanup procedure to prevent premature termination. It allows the application to save its state properly.

Note that navigator_extend_terminate() can only be used to delay termination for up to 30 seconds, after which the application will be terminated.

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.