diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-05 15:13:44 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-05 15:22:17 -0400 |
commit | 1e417b7275028a50227f57fb71d04c1837ec4b2c (patch) | |
tree | 3cbf379caf8367391980abf3a562b20eb4d63052 /src/lib/evloop/procmon.h | |
parent | 947de40d198d83e561320afe5d0146f43dc9192a (diff) | |
download | tor-1e417b7275028a50227f57fb71d04c1837ec4b2c.tar.gz tor-1e417b7275028a50227f57fb71d04c1837ec4b2c.zip |
All remaining files in src/common belong to the event loop.
Diffstat (limited to 'src/lib/evloop/procmon.h')
-rw-r--r-- | src/lib/evloop/procmon.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/lib/evloop/procmon.h b/src/lib/evloop/procmon.h new file mode 100644 index 0000000000..b8daeed0db --- /dev/null +++ b/src/lib/evloop/procmon.h @@ -0,0 +1,34 @@ +/* Copyright (c) 2011-2018, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file procmon.h + * \brief Headers for procmon.c + **/ + +#ifndef TOR_PROCMON_H +#define TOR_PROCMON_H + +#include "common/compat_libevent.h" + +#include "lib/log/torlog.h" + +typedef struct tor_process_monitor_t tor_process_monitor_t; + +/* DOCDOC tor_procmon_callback_t */ +typedef void (*tor_procmon_callback_t)(void *); + +int tor_validate_process_specifier(const char *process_spec, + const char **msg); +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); +void tor_process_monitor_free_(tor_process_monitor_t *procmon); +#define tor_process_monitor_free(procmon) \ + FREE_AND_NULL(tor_process_monitor_t, tor_process_monitor_free_, (procmon)) + +#endif /* !defined(TOR_PROCMON_H) */ + |