1 /* Copyright (c) 2011-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
6 * \brief Headers for procmon.c
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
,
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
,
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) */