summaryrefslogtreecommitdiff
path: root/proto-shell.c
diff options
context:
space:
mode:
authorUlrich Weber <uweber.linux@gmail.com>2014-06-10 10:51:06 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-08-31 14:22:06 +0200
commitf33922cf7fbd23d56e8aeb591d2841e0856fa164 (patch)
treef6e6f3bca2aef8378714777a67da00419ede3a99 /proto-shell.c
parent4716798f0c6ecf7953edee5bcc6eb34dc76f27b4 (diff)
downloadnetifd-f33922cf7fbd23d56e8aeb591d2841e0856fa164.tar.gz
proto-shell: set proto_task_killed for SIGTERM only
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>
Diffstat (limited to 'proto-shell.c')
-rw-r--r--proto-shell.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/proto-shell.c b/proto-shell.c
index 86dc9ce..f32a32f 100644
--- a/proto-shell.c
+++ b/proto-shell.c
@@ -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);
}