1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-11-09 09:46:18 +01:00
doorlockd-mirror/doorlockd/daemon.h

19 lines
524 B
C
Raw Normal View History

2015-05-14 15:30:55 +02:00
#ifndef DAEMON_H
#define DAEMON_H
#include <string>
2015-05-21 13:35:30 +02:00
// Daemonizes the process if daemonize is true.
// If daemonize is true, it will write the new PID to the file "pidFile"
//
// This function will also redirect stdin, out and err to the
// specified files
2015-05-14 15:30:55 +02:00
void daemonize(const bool daemonize,
const std::string &dir,
const std::string &stdinfile,
const std::string &stdoutfile,
const std::string &stderrfile,
const std::string &pidFile);
#endif