简体   繁体   English

init.rc中的事件在哪里启动?

[英]Where do events in init.rc are initiated?

I have been trying to understand where do events in init.rc are initiated. 我一直试图了解init.rc中的事件在哪里开始的。
on fs
mount yaffs2 mtd@system /system

on property:vold.decrypt=trigger_reset_main
class_reset main

One thing I know is that events can be triggered using trigger in init.rc itself. 我知道的一件事是,可以使用init.rc本身中的trigger来触发事件。 Where do these events are initiated outside init.rc? 这些事件在init.rc之外的何处启动?

This is all managed in init.c 全部在init.c中管理

The property system is a little bit complex. 财产制度有点复杂。

There is a property service resident in init process. 初始化过程中有一个物业服务居民。 Init process maintains several name spaces of the properties. 初始化过程维护属性的几个名称空间。 Eg ro.xx, system.xx, persist.xx. 例如ro.xx,system.xx,persist.xx。

Property setter set the property via notifying the unix socket message. 属性设置器通过通知UNIX套接字消息来设置属性。 So init process knows every setting action and you can see from the code that there is a callback "property_changed" called every time when a property is set. 因此,init进程知道每个设置操作,并且您可以从代码中看到,每次设置属性时都会调用一个回调“ property_changed”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM