procmon.h 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /* Copyright (c) 2011-2016, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. /**
  4. * \file procmon.h
  5. * \brief Headers for procmon.c
  6. **/
  7. #ifndef TOR_PROCMON_H
  8. #define TOR_PROCMON_H
  9. #include "compat.h"
  10. #include "compat_libevent.h"
  11. #include "torlog.h"
  12. typedef struct tor_process_monitor_t tor_process_monitor_t;
  13. /* DOCDOC tor_procmon_callback_t */
  14. typedef void (*tor_procmon_callback_t)(void *);
  15. int tor_validate_process_specifier(const char *process_spec,
  16. const char **msg);
  17. tor_process_monitor_t *tor_process_monitor_new(struct event_base *base,
  18. const char *process_spec,
  19. log_domain_mask_t log_domain,
  20. tor_procmon_callback_t cb,
  21. void *cb_arg,
  22. const char **msg);
  23. void tor_process_monitor_free(tor_process_monitor_t *procmon);
  24. #endif