From 98844b88980e2001ae3d8cd10f99d8ae9ac32b75 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 9 Jan 2008 17:01:48 +0100 Subject: [PATCH] Fix shutdown procedure --- plugins/supplicant.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/supplicant.c b/plugins/supplicant.c index 4787f43..583b1f7 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -244,6 +244,10 @@ int __supplicant_stop(struct connman_iface *iface) exec_cmd(task, "DETACH"); + sleep(1); + + kill(task->pid, SIGTERM); + //close(task->socket); g_io_channel_unref(task->channel); @@ -251,8 +255,6 @@ int __supplicant_stop(struct connman_iface *iface) "%s/%s.cli", STATEDIR, task->ifname); unlink(pathname); - kill(task->pid, SIGTERM); - free(task->ifname); g_free(task); -- 1.7.9.5