proto-shell: set proto_task_killed for SIGTERM only
authorUlrich Weber <uweber.linux@gmail.com>
Tue, 10 Jun 2014 10:51:06 +0000 (10:51 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 31 Aug 2014 12:22:06 +0000 (14:22 +0200)
otherwise teardown will not kill the process
if the interface was renewed before, which
set proto_task_killed

Signed-off-by: Ulrich Weber <uw@ocedo.com>
proto-shell.c

index 86dc9ced2ebc90cc3fa5407c068ce989b39605c2..f32a32f193a37e02f1e7a9fd1e0d5c0df194f008 100644 (file)
@@ -578,7 +578,8 @@ proto_shell_kill_command(struct proto_shell_state *state, struct blob_attr **tb)
                signal = SIGTERM;
 
        if (state->proto_task.uloop.pending) {
-               state->proto_task_killed = true;
+               if (signal == SIGTERM)
+                       state->proto_task_killed = true;
                kill(state->proto_task.uloop.pid, signal);
        }