Skip to content

Commit

Permalink
incusd/main_forknet: Tweak process title
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed Nov 27, 2024
1 parent 6277b25 commit 9064bdd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmd/incusd/main_forknet.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,14 @@ static void forkdonetdhcp() {
}
// Set the process title.
(void)setproctitle("[incus DHCP] eth0");
char *workdir = advance_arg(false);
if (workdir != NULL) {
char *title = malloc(sizeof(char)*strlen(workdir)+19);
if (title != NULL) {
sprintf(title, "[incus dhcp] %s eth0", workdir);
(void)setproctitle(title);
}
}
// Jump back to Go for the rest
}
Expand Down

0 comments on commit 9064bdd

Please sign in to comment.