int yaz_daemon(const char *progname,
unsigned int flags,
void (*work)(void *data), void *data,
const char *pidfile, const char *uid)
{
int yaz_daemon(const char *progname,
unsigned int flags,
void (*work)(void *data), void *data,
const char *pidfile, const char *uid)
{