xref: /lighttpd1.4/src/fdlog.h (revision a5581b03)
1 #ifndef INCLUDED_FDLOG_H
2 #define INCLUDED_FDLOG_H
3 #include "first.h"
4 
5 #include "base_decls.h"
6 #include "buffer.h"
7 
8 struct fdlog_st {
9     enum { FDLOG_FILE, FDLOG_FD, FDLOG_SYSLOG, FDLOG_PIPE } mode;
10     int fd;
11     buffer b;
12     const char *fn;
13 };
14 
15 __attribute_cold__
16 __attribute_returns_nonnull__
17 fdlog_st * fdlog_init (const char *fn, int fd, int mode);
18 
19 __attribute_cold__
20 void fdlog_free (fdlog_st *fdlog);
21 
22 /* fdlog_maint.c */
23 
24 __attribute_cold__
25 fdlog_st * fdlog_open (const char *fn);
26 
27 __attribute_cold__
28 void fdlog_closeall (fdlog_st *errh);
29 
30 __attribute_cold__
31 void fdlog_flushall (fdlog_st *errh);
32 
33 __attribute_cold__
34 void fdlog_files_flush (fdlog_st *errh, int memrel);
35 
36 __attribute_cold__
37 void fdlog_files_cycle (fdlog_st *errh);
38 
39 __attribute_cold__
40 int fdlog_pipes_waitpid_cb (pid_t pid);
41 
42 __attribute_cold__
43 void fdlog_pipes_restart (unix_time64_t ts);
44 
45 __attribute_cold__
46 void fdlog_pipes_abandon_pids (void);
47 
48 __attribute_cold__
49 void fdlog_pipe_serrh (int fd);
50 
51 #endif
52