libi2ncommon: (tomj) added daemon handling and recursive_delete()
[libi2ncommon] / src / daemonfunc.hxx
CommitLineData
0a654ec0
TJ
1/***************************************************************************
2 * Copyright (C) 2008 by Intra2net AG - Thomas Jarosch *
3 * thomas.jarosch@intra2net.com *
4 * http://www.intra2net.com *
5 ***************************************************************************/
6#ifndef DAEMONFUNC_H
7#define DAEMONFUNC_H
8
9#include <sys/types.h>
10#include <string>
11
12/// Collection of functions for daemons
13class daemon
14{
15public:
16 static void daemonize();
17
18 static uid_t lookup_uid(const std::string &username);
19 static gid_t lookup_gid(const std::string &group);
20
21 static void drop_root_priviledges(const std::string &username,
22 const std::string &group);
23};
24
25#endif