X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fdaemon.h;h=6819725c7900cf49694124b16d11c424f41aa6b1;hp=3d14c2aafeb6a83ad40c7216f8b4e81b5977e504;hb=799ea46466fc7433ce75d7c66d796b5a0997f59c;hpb=379504a233e3e2cc85bca1e7b6d864f1395aec7c diff --git a/include/yaz/daemon.h b/include/yaz/daemon.h index 3d14c2a..6819725 100644 --- a/include/yaz/daemon.h +++ b/include/yaz/daemon.h @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data. + * Copyright (C) 1995-2013 Index Data. * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -59,7 +59,7 @@ YAZ_BEGIN_CDECL Flag YAZ_DAEMON_DEBUG: Puts the service in debug mode (no fork at all). - Flag YAZ_DAEMON_KEEPALIVE: Repeatedly calls work handler if it makes a + Flag YAZ_DAEMON_KEEPALIVE: Repeatedly calls work handler if it makes a "fatal" error. */ YAZ_EXPORT @@ -68,6 +68,17 @@ int yaz_daemon(const char *progname, void (*work)(void *data), void *data, const char *pidfile, const char *uid); +/** \brief stop daemon - stop parent process + + This function sends a signal to the parent keepalive process that + makes it exit immediately - without waiting. If there's no parent + keepalive process, this function does nothing. SHould be called + when the child process has freed resources, such as listening socket. + But the child process may continue running. +*/ +YAZ_EXPORT +void yaz_daemon_stop(void); + YAZ_END_CDECL #endif