rephist: Introduce a fraction and period for overload onionskin
[tor.git] / src / lib / evloop / procmon.h
blobdb5382627de6141a7f97611fdd0e78f48dc7d52c
1 /* Copyright (c) 2011-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
4 /**
5 * \file procmon.h
6 * \brief Headers for procmon.c
7 **/
9 #ifndef TOR_PROCMON_H
10 #define TOR_PROCMON_H
12 #include "lib/evloop/compat_libevent.h"
14 #include "lib/log/log.h"
16 typedef struct tor_process_monitor_t tor_process_monitor_t;
18 /* DOCDOC tor_procmon_callback_t */
19 typedef void (*tor_procmon_callback_t)(void *);
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,
25 log_domain_mask_t log_domain,
26 tor_procmon_callback_t cb,
27 void *cb_arg,
28 const char **msg);
29 void tor_process_monitor_free_(tor_process_monitor_t *procmon);
30 #define tor_process_monitor_free(procmon) \
31 FREE_AND_NULL(tor_process_monitor_t, tor_process_monitor_free_, (procmon))
33 #endif /* !defined(TOR_PROCMON_H) */