Coda Distributed File System
coda-src
util
daemonizer.h
Go to the documentation of this file.
1
/* BLURB gpl
2
3
Coda File System
4
Release 6
5
6
Copyright (c) 2004 Carnegie Mellon University
7
Additional copyrights listed below
8
9
This code is distributed "AS IS" without warranty of any kind under
10
the terms of the GNU General Public Licence Version 2, as shown in the
11
file LICENSE. The technical and financial contributors to Coda are
12
listed in the file CREDITS.
13
14
Additional copyrights
15
none currently
16
17
#*/
18
19
#ifndef _DAEMONIZER_H_
20
#define _DAEMONIZER_H_
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
26
/* Fork into the background and if pidfile != NULL write our process id
27
* to that file. this function returns an fd, which we use to signal the
28
* parent whenever we're up and running.
29
* stdout and stderr still have to be redirected */
30
int
daemonize
(
void
);
31
32
/* write our pid to pidfile and keep the file locked */
33
void
update_pidfile
(
const
char
*pidfile);
34
35
/* Let the parent process know that we've successfully started. */
36
void
gogogo
(
int
parent_fd
);
37
38
#ifdef __cplusplus
39
}
40
#endif
41
42
#endif
/* _DAEMONIZER_H_ */
update_pidfile
void update_pidfile(const char *pidfile)
Definition:
daemonizer.c:63
gogogo
void gogogo(int parent_fd)
Definition:
daemonizer.c:192
daemonize
int daemonize(void)
Definition:
daemonizer.c:141
parent_fd
int parent_fd
Definition:
venus.cc:158
Generated by
1.9.4