Line data Source code
1 : /* Copyright (c) 2018-2021, The Tor Project, Inc. */ 2 : /* See LICENSE for licensing information */ 3 : 4 : /** 5 : * \file process_sys.c 6 : * \brief Subsystem object for process setup. 7 : **/ 8 : 9 : #include "orconfig.h" 10 : #include "lib/subsys/subsys.h" 11 : #include "lib/process/process_sys.h" 12 : #include "lib/process/process.h" 13 : 14 : static int 15 5553 : subsys_process_initialize(void) 16 : { 17 5553 : process_init(); 18 5553 : return 0; 19 : } 20 : 21 : static void 22 235 : subsys_process_shutdown(void) 23 : { 24 235 : process_free_all(); 25 235 : } 26 : 27 : const subsys_fns_t sys_process = { 28 : .name = "process", 29 : SUBSYS_DECLARE_LOCATION(), 30 : .level = -18, 31 : .supported = true, 32 : .initialize = subsys_process_initialize, 33 : .shutdown = subsys_process_shutdown 34 : };