标签:
init进程fork servicemanager进程用来提供(server)注册service和(client)检索service功能。servicemanager维护了一个service列表,client可以通过该service名字获取该服务引用。
源码位于frameworks/native/cmds/servicemanager
servicemanager是第一个被init进程启动的进程
现在被init启动的进程会自动与其同名的rc文件绑定,故现有servicemanager.rc文件,定义这个进程的属性
service servicemanager /system/bin/servicemanager
class core
user system
group system readproc
critical
onrestart restart healthd
onrestart restart zygote
onrestart restart audioserver
onrestart restart media
onrestart restart surfaceflinger
onrestart restart inputflinger
onrestart restart drm
onrestart restart cameraserver
writepid /dev/cpuset/system-background/tasks
标签:
原文地址:http://www.cnblogs.com/cascle/p/5866366.html