1
0
mirror of https://github.com/binary-kitchen/doorlockd synced 2024-11-16 20:19:13 +01:00
doorlockd-mirror/doorlockd/daemon.h

17 lines
444 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
void daemonize(const std::string &dir,
2015-05-14 15:30:55 +02:00
const std::string &stdinfile,
const std::string &stdoutfile,
const std::string &stderrfile);
2015-05-14 15:30:55 +02:00
#endif