FreeBSD/contrib/blacklist/port/pidfile.c
/* Registers an atexit(3) handler to delete the pidfile we have generated.
 * We only register the handler when we create a pidfile, so we can assume
 * that the pidfile exists.
 *
 * Returns 0 on success or -1 if the handler could not be registered. */
Registers an atexit(3) handler to delete the pidfile we have generated.
We only register the handler when we create a pidfile, so we can assume
that the pidfile exists.

Returns 0 on success or -1 if the handler could not be registered.
Registers an atexit ( 3 ) handler to delete the pidfile we have generated . We only register the handler when we create a pidfile so we can assume that the pidfile exists . Returns 0 on success or - 1 if the handler could not be registered .
static int
register_atexit_handler(void)
{
	static bool done = false;
	if (!done) {
		if (atexit(pidfile_cleanup) < 0)
			return -1;
		done = true;
	}
	return 0;
}
static int register_atexit_handler ( void ) { static bool done = false ; if ( ! done ) { if ( atexit ( pidfile_cleanup ) < 0 ) return -1 ; done = true ; } return 0 ; }
Registers an atexit(3) handler to delete the pidfile we have generated.
Registers an atexit ( 3 ) handler to delete the pidfile we have generated .