/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/miscutil.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/miscutil.c,v $
* Description : Writes a pid file with the pid of the main process.
* Exits if the file can't be opened
*
* Description : Writes a pid file with the pid of the main process.
* Exits if the file can't be opened
*
if ((fp = fopen(pidfile, "w")) == NULL)
{
log_error(LOG_LEVEL_FATAL, "can't open pidfile '%s': %E", pidfile);
if ((fp = fopen(pidfile, "w")) == NULL)
{
log_error(LOG_LEVEL_FATAL, "can't open pidfile '%s': %E", pidfile);