mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-09 08:00:51 +00:00
cmd/lxc_init: do not hide global variable
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
489b0b2913
commit
c837120231
@ -182,17 +182,17 @@ static void kill_children(pid_t pid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (!feof(f)) {
|
while (!feof(f)) {
|
||||||
pid_t pid;
|
pid_t find_pid;
|
||||||
|
|
||||||
if (fscanf(f, "%d ", &pid) != 1) {
|
if (fscanf(f, "%d ", &find_pid) != 1) {
|
||||||
if (my_args.quiet)
|
if (my_args.quiet)
|
||||||
fprintf(stderr, "Failed to retrieve pid\n");
|
fprintf(stderr, "Failed to retrieve pid\n");
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
kill_children(pid);
|
(void)kill_children(find_pid);
|
||||||
kill(pid, SIGKILL);
|
(void)kill(find_pid, SIGKILL);
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
Loading…
Reference in New Issue
Block a user