PHP.nl

win32_set_service_exit_mode

win32_set_service_exit_mode

Define or return the exit mode for the current running service

bool **win32_set_service_exit_mode** bool $gracefulMode

If parameter is provided, the exit mode is changed. When the exit mode is not gracefuly, the exit code used can be set with the function. gracefulMode``win32_set_service_exit_code

Let op: > This function work only in "cli" SAPI. On other SAPI this function is disabled.

gracefulModetrue for exit graceful. false for exit with error.

Return the current or old exit mode.

Prior to version 1.0.0, if the SAPI is not , this function emits an level error. "cli"``E_ERROR

As of version 1.0.0, will throw a 
 if SAPI is not 

Win32ServiceException``"cli"

win32_start_service_ctrl_dispatcher``win32_set_service_status``win32_set_service_exit_code