Hello
I am using z-way libzway API quite successfully in my C application it
seems to be quite robust as is.
However the exit - I cannot make it cleanly.
The app (service) is terminated by a signal SIGINT, SIGHUP or SIGTERM
launcing ShutdownHandler
The ShutdownHandler calls for zway_stop(zway) & zway_terminate(&zway)
but either one is re-calling the ShutdownHandler again and this leads into
endless loop so the service never stops.
I do have several zdata_add_callback_ex() "threads"in the program but trying to cancel/free them
(before zway_stop() in ShutdownHandler) with zdata_remove_callback_ex() does
return something else than 'NoError'
I do have to go throug ShutdownHandler as the other parts of the software needs cleaning also.
Can not make graceful exit (C-API) program
Re: Can not make graceful exit (C-API) program
- zway_stop is stopping the Z-Way thread (opposite to zway_start)
- zway_terminate is freeing zway structure (opposite to zway_init) - it calls zway_stop internally before freeing
Re: Can not make graceful exit (C-API) program
Great,
Thanks for pointing the direction - got it now.
Thanks for pointing the direction - got it now.