aboutsummaryrefslogtreecommitdiffstats
path: root/init/subsys.c
diff options
context:
space:
mode:
authorturret <turret@duck.com>2023-12-18 16:13:36 -0600
committerturret <turret@duck.com>2023-12-18 16:13:36 -0600
commit54b308af97b91ceabb0a482f325d3a8595b01aa3 (patch)
treeadbe345bca29943f02f54c86dc1ec17d5aa3528a /init/subsys.c
parent22cacb4dc96faae8814a9696805314c0fcc455ba (diff)
downloaddiscord-bot-skeleton-54b308af97b91ceabb0a482f325d3a8595b01aa3.tar.gz
discord-bot-skeleton-54b308af97b91ceabb0a482f325d3a8595b01aa3.tar.bz2
discord-bot-skeleton-54b308af97b91ceabb0a482f325d3a8595b01aa3.zip
*: enforce 78 char line limit
Diffstat (limited to 'init/subsys.c')
-rw-r--r--init/subsys.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/init/subsys.c b/init/subsys.c
index d080ba6..3db2cb5 100644
--- a/init/subsys.c
+++ b/init/subsys.c
@@ -41,7 +41,8 @@ static int __subsystem_entry(struct subsystem_info *info)
prctl(PR_SET_NAME, name);
free(name);
- print(LOG_DEBUG "subsys: starting subsystem %s (%d)", info->fn_name, getpid());
+ print(LOG_DEBUG "subsys: starting subsystem %s (%d)",
+ info->fn_name, getpid());
int ret = info->fn();
@@ -81,13 +82,16 @@ int subsystem_handle_term(int pid)
if(!subsystem || subsystem->pid != pid)
continue;
- print(LOG_DEBUG "subsys: subsystem terminated %s (%d)", subsystem->fn_name, pid);
+ print(LOG_DEBUG "subsys: subsystem terminated %s (%d)",
+ subsystem->fn_name, pid);
if(subsystem->mode == PANICMODE_RESPAWN
&& subsystem->respawn_count < MAX_RESPAWN) {
++(subsystem->respawn_count);
- int pid = clone((int (*)(void *))__subsystem_entry, (void *)((long)(subsystem->stack) + stack_size), CLONE_FILES | CLONE_VM | SIGCHLD, subsystem);
+ int pid = clone((int (*)(void *))__subsystem_entry,
+ (void *)((long)(subsystem->stack) + stack_size),
+ CLONE_FILES | CLONE_VM | SIGCHLD, subsystem);
subsystem->pid = pid;
if(pid < 0) {
print(LOG_CRIT "subsys: cannot re-start subsystem %s: "