return r;
}
-bool write_pidfile(const char *filename)
+int write_pidfile(const char *filename)
{
FILE *pidfile;
long pid;
pidfile = fopen(filename, "w");
if(!pidfile) {
logmsg("Couldn't write pid file: %s %s", filename, strerror(ERRNO));
- return FALSE;
+ return 0; /* fail */
}
fprintf(pidfile, "%ld\n", pid);
fclose(pidfile);
logmsg("Wrote pid %ld to %s", pid, filename);
- return TRUE;
+ return 1; /* success */
}
*
* $Id$
***************************************************************************/
-#include "setup.h" /* portability help from the lib directory */
void logmsg(const char *msg, ...);
int wait_ms(int timeout_ms);
-bool write_pidfile(const char *filename);
+int write_pidfile(const char *filename);
#endif /* __SERVER_UTIL_H */