init: add stdio_to_kmsg option
Some services are not native android services and therefore don't log
via the normal mechanisms. This gives developers an option to have
their stdout/stderr logs sent directly to kmsg.
Test: see test prints to kernel log
Change-Id: I7973ea74d5cab3a90c2cd9a3d5de2266439d0c01
diff --git a/init/service_utils.h b/init/service_utils.h
index d2e69d9..3f1071e 100644
--- a/init/service_utils.h
+++ b/init/service_utils.h
@@ -77,6 +77,7 @@
gid_t gid;
std::vector<gid_t> supp_gids;
int priority;
+ bool stdio_to_kmsg;
};
Result<void> SetProcessAttributes(const ProcessAttributes& attr);