summaryrefslogtreecommitdiff
path: root/uxc.c
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2020-11-22 03:16:31 +0000
committerDaniel Golle <daniel@makrotopia.org>2020-11-22 03:17:19 +0000
commitdf7fa7bae605e865c5ab2b80461a4ccbbbfc1fab (patch)
tree586a894a559c64de7e9a56dd80d8a3a5de641a3e /uxc.c
parentb22e6254df3a3502cc62154ae8e54fce7e3fa48b (diff)
downloadprocd-df7fa7bae605e865c5ab2b80461a4ccbbbfc1fab.tar.gz
uxc: fix incomplete commit
Fixes: 04a2edd ("uxc: make force-delete kill container process") Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'uxc.c')
-rw-r--r--uxc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/uxc.c b/uxc.c
index 9e73b07..5809b6d 100644
--- a/uxc.c
+++ b/uxc.c
@@ -639,6 +639,7 @@ static int uxc_boot(void)
static int uxc_delete(char *name, bool force)
{
struct blob_attr *cur, *tb[__CONF_MAX];
+ struct runtime_state *s = NULL;
int rem, ret = 0;
bool found = false;
char *fname;
@@ -663,9 +664,11 @@ static int uxc_delete(char *name, bool force)
if (!found)
return ENOENT;
+ s = avl_find_element(&runtime, name, s, avl);
+
if (s && s->running) {
if (force) {
- ret = uxc_kill(name, SIGKILL));
+ ret = uxc_kill(name, SIGKILL);
if (ret)
goto errout;