Usually should be run in SIGTERM and SIGINT handlers. @return 0 on success and -1 on error (also sets errno).
See Implementation
Usually should be run in SIGTERM and SIGINT handlers. @return 0 on success and -1 on error (also sets errno).