util_process.h 825 B

1234567891011121314151617181920212223242526
  1. /* Copyright (c) 2011-2016, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. /**
  4. * \file util_process.h
  5. * \brief Headers for util_process.c
  6. **/
  7. #ifndef TOR_UTIL_PROCESS_H
  8. #define TOR_UTIL_PROCESS_H
  9. #ifndef _WIN32
  10. /** A callback structure waiting for us to get a SIGCHLD informing us that a
  11. * PID has been closed. Created by set_waitpid_callback. Cancelled or cleaned-
  12. * up from clear_waitpid_callback(). Do not access outside of the main thread;
  13. * do not access from inside a signal handler. */
  14. typedef struct waitpid_callback_t waitpid_callback_t;
  15. waitpid_callback_t *set_waitpid_callback(pid_t pid,
  16. void (*fn)(int, void *), void *arg);
  17. void clear_waitpid_callback(waitpid_callback_t *ent);
  18. void notify_pending_waitpid_callbacks(void);
  19. #endif
  20. #endif