fix the exit status for the proto-shell task, use WEXITSTATUS
authorFelix Fietkau <nbd@openwrt.org>
Fri, 21 Oct 2011 01:36:26 +0000 (03:36 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 21 Oct 2011 01:36:26 +0000 (03:36 +0200)
proto-shell.c

index fc16f76..3582319 100644 (file)
@@ -155,7 +155,7 @@ proto_shell_task_cb(struct netifd_process *p, int ret)
                return;
        }
 
-       state->last_error = ret;
+       state->last_error = WEXITSTATUS(ret);
        state->proto.proto_event(&state->proto, IFPEV_LINK_LOST);
        proto_shell_handler(&state->proto, PROTO_CMD_TEARDOWN, false);
 }