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 fc16f76c6d8a09d4f0924fa82c0cb4264fe24037..3582319cb39ebb52f8e952f8f76d50a63acb9017 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);
 }