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 206ad81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/incusd/main_forknet.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ static void forkdonetdhcp() {
}
// Set the process title.
(void)setproctitle("[incus DHCP] eth0");
char *workdir = advance_arg(false);
char *title = malloc(sizeof(char)*strlen(workdir)+18);
sprintf(title, "[incus dhcp] %s eth0", workdir);
(void)setproctitle(title);
// Jump back to Go for the rest
}
Expand Down

0 comments on commit 206ad81

Please sign in to comment.