ctorrent stat collector
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
606B

  1. #ifndef _PROCESS_H_
  2. #define _PROCESS_H_
  3. #include <sys/types.h>
  4. #include "list.h"
  5. struct child_process {
  6. struct list_head list;
  7. char **argv;
  8. char *pwd;
  9. int fd[3];
  10. pid_t pid;
  11. void (*exit_cb)(struct child_process *child, int exit_code, void *privdata);
  12. void *privdata;
  13. };
  14. struct child_process * childproc_alloc(char *const argv[], const char *pwd);
  15. int childproc_free(struct child_process *child);
  16. pid_t childproc_fork(struct child_process *child, void (*exit_cb)(struct child_process *child, int exit_code, void *privdata), void *privdata);
  17. void childproc_cleanup(void);
  18. #endif // _SPAWN_H_