Skip to content

Commit 206ad81

Browse files
committed
incusd/main_forknet: Tweak process title
Signed-off-by: Stéphane Graber <[email protected]>
1 parent 6277b25 commit 206ad81

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/incusd/main_forknet.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ static void forkdonetdhcp() {
135135
}
136136
137137
// Set the process title.
138-
(void)setproctitle("[incus DHCP] eth0");
138+
char *workdir = advance_arg(false);
139+
char *title = malloc(sizeof(char)*strlen(workdir)+18);
140+
sprintf(title, "[incus dhcp] %s eth0", workdir);
141+
142+
(void)setproctitle(title);
139143
140144
// Jump back to Go for the rest
141145
}

0 commit comments

Comments
 (0)