Tor  0.4.7.0-alpha-dev
procmon.h
Go to the documentation of this file.
1 /* Copyright (c) 2011-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
4 /**
5  * \file procmon.h
6  * \brief Headers for procmon.c
7  **/
8 
9 #ifndef TOR_PROCMON_H
10 #define TOR_PROCMON_H
11 
13 
14 #include "lib/log/log.h"
15 
17 
18 /* DOCDOC tor_procmon_callback_t */
19 typedef void (*tor_procmon_callback_t)(void *);
20 
21 int tor_validate_process_specifier(const char *process_spec,
22  const char **msg);
23 tor_process_monitor_t *tor_process_monitor_new(struct event_base *base,
24  const char *process_spec,
26  tor_procmon_callback_t cb,
27  void *cb_arg,
28  const char **msg);
30 #define tor_process_monitor_free(procmon) \
31  FREE_AND_NULL(tor_process_monitor_t, tor_process_monitor_free_, (procmon))
32 
33 #endif /* !defined(TOR_PROCMON_H) */
34 
Header for compat_libevent.c.
Headers for log.c.
uint64_t log_domain_mask_t
Definition: logging_types.h:21
tor_process_monitor_t * tor_process_monitor_new(struct event_base *base, const char *process_spec, log_domain_mask_t log_domain, tor_procmon_callback_t cb, void *cb_arg, const char **msg)
Definition: procmon.c:181
int tor_validate_process_specifier(const char *process_spec, const char **msg)
Definition: procmon.c:157
void tor_process_monitor_free_(tor_process_monitor_t *procmon)
Definition: procmon.c:325
tor_procmon_callback_t cb
Definition: procmon.c:148
log_domain_mask_t log_domain
Definition: procmon.c:104