init: expand_props for onrestart commands.

It is only a temporary fix. I hope the code can be moved into a member
function of class Command.

Bug: 22654233
Change-Id: I38c24fb624e54986a953f44d398b3b80c3795d24
diff --git a/init/signal_handler.cpp b/init/signal_handler.cpp
index 39a466d..6893163 100644
--- a/init/signal_handler.cpp
+++ b/init/signal_handler.cpp
@@ -136,7 +136,14 @@
     struct listnode* node;
     list_for_each(node, &svc->onrestart.commands) {
         command* cmd = node_to_item(node, struct command, clist);
-        cmd->func(cmd->nargs, cmd->args);
+        std::vector<std::string> arg_strs;
+        if (expand_command_arguments(cmd->nargs, cmd->args, &arg_strs)) {
+            std::vector<char*> args;
+            for (auto& s : arg_strs) {
+                args.push_back(&s[0]);
+            }
+            cmd->func(args.size(), &args[0]);
+        }
     }
     svc->NotifyStateChange("restarting");
     return true;