Back to index

tor  0.2.3.18-rc
procmon.h
Go to the documentation of this file.
00001 /* Copyright (c) 2011-2012, The Tor Project, Inc. */
00002 /* See LICENSE for licensing information */
00003 
00009 #ifndef TOR_PROCMON_H
00010 #define TOR_PROCMON_H
00011 
00012 #include "compat.h"
00013 #include "compat_libevent.h"
00014 
00015 #include "torlog.h"
00016 
00017 typedef struct tor_process_monitor_t tor_process_monitor_t;
00018 
00019 /* DOCDOC tor_procmon_callback_t */
00020 typedef void (*tor_procmon_callback_t)(void *);
00021 
00022 int tor_validate_process_specifier(const char *process_spec,
00023                                    const char **msg);
00024 tor_process_monitor_t *tor_process_monitor_new(struct event_base *base,
00025                                                const char *process_spec,
00026                                                log_domain_mask_t log_domain,
00027                                                tor_procmon_callback_t cb,
00028                                                void *cb_arg,
00029                                                const char **msg);
00030 void tor_process_monitor_free(tor_process_monitor_t *procmon);
00031 
00032 #endif
00033