summaryrefslogtreecommitdiff
path: root/src/irmd/reg/reg.h
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2024-02-23 13:27:38 +0100
committerSander Vrijders <[email protected]>2024-02-23 16:41:38 +0100
commitb65e5c1d45c8bfc38b3745cb28ac9074b1c1bdc1 (patch)
tree19aac189a295822ca597b6c923b27becc6249c20 /src/irmd/reg/reg.h
parentb7baa89fbaa04ceb3227d4d43089d8e6a5326b65 (diff)
downloadouroboros-b65e5c1d45c8bfc38b3745cb28ac9074b1c1bdc1.tar.gz
ouroboros-b65e5c1d45c8bfc38b3745cb28ac9074b1c1bdc1.zip
irmd: Always use reg_destroy_proc
Destroying a process will now always be done with reg_destroy_proc, regardless of whether it was an IPCP or spawned. This makes it easier to keep the registry consistent and avoid races. Also improves some logs and updates some default settings. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/irmd/reg/reg.h')
-rw-r--r--src/irmd/reg/reg.h53
1 files changed, 25 insertions, 28 deletions
diff --git a/src/irmd/reg/reg.h b/src/irmd/reg/reg.h
index e6deb8e4..17dfcc32 100644
--- a/src/irmd/reg/reg.h
+++ b/src/irmd/reg/reg.h
@@ -43,9 +43,32 @@ int reg_destroy_flow(int flow_id);
bool reg_has_flow(int flow_id);
-int reg_create_ipcp(const struct ipcp_info * info);
+int reg_create_proc(const struct proc_info * info);
+
+/* Use this for all processes, including ipcps */
+int reg_destroy_proc(pid_t pid);
-int reg_destroy_ipcp(pid_t pid);
+bool reg_has_proc(pid_t pid);
+
+void reg_kill_all_proc(int signal);
+
+pid_t reg_get_dead_proc(void);
+
+int reg_create_spawned(pid_t pid);
+
+bool reg_has_spawned(pid_t pid);
+
+void reg_kill_all_spawned(int signal);
+
+int reg_first_spawned(void);
+
+int reg_bind_proc(const char * name,
+ pid_t proc);
+
+int reg_unbind_proc(const char * name,
+ pid_t proc);
+
+int reg_create_ipcp(const struct ipcp_info * info);
bool reg_has_ipcp(pid_t pid);
@@ -70,32 +93,6 @@ bool reg_has_name(const char * name);
/* TODO don't rely on protobuf here */
int reg_list_names(name_info_msg_t *** names);
-int reg_create_proc(const struct proc_info * info);
-
-int reg_destroy_proc(pid_t pid);
-
-bool reg_has_proc(pid_t pid);
-
-void reg_kill_all_proc(int signal);
-
-pid_t reg_get_dead_proc(void);
-
-int reg_create_spawned(pid_t pid);
-
-int reg_destroy_spawned(pid_t pid);
-
-bool reg_has_spawned(pid_t pid);
-
-void reg_kill_all_spawned(int signal);
-
-int reg_first_spawned(void);
-
-int reg_bind_proc(const char * name,
- pid_t proc);
-
-int reg_unbind_proc(const char * name,
- pid_t proc);
-
int reg_create_prog(const struct prog_info * info);
int reg_destroy_prog(const char * name);