Coda Distributed File System
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
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU General Public Licence Version 2, as shown in the
11file LICENSE. The technical and financial contributors to Coda are
12listed 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
23extern "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 */
30int daemonize(void);
31
32/* write our pid to pidfile and keep the file locked */
33void update_pidfile(const char *pidfile);
34
35/* Let the parent process know that we've successfully started. */
36void gogogo(int parent_fd);
37
38#ifdef __cplusplus
39}
40#endif
41
42#endif /* _DAEMONIZER_H_ */
void update_pidfile(const char *pidfile)
Definition: daemonizer.c:63
void gogogo(int parent_fd)
Definition: daemonizer.c:192
int daemonize(void)
Definition: daemonizer.c:141
int parent_fd
Definition: venus.cc:158