init.rc中使用exec起 program访问NvRam数据导致系统开机卡住
时间:10-02
整理:3721RD
点击:
[Description]
init.rc中使用exec起program访问NvRam数据导致开机卡住
写法举例:exec /system/xbin/myprog
[root Cause]
当myprog采用exec方式, init过程执行到这部分内容时, init需要一直等待直至exec myprog完成才能继续,最终导致系统被卡住。
\\alps\system\core\init\readme.txt 中有对exec这个command的用法做详细描述:
[Solution]
在init.rc中start一个service去做此类动作,就可以避免stuck问题。
e.g.,
exec <path> [ <argument> ]*
Fork and execute a program (<path>). This will block until the program completes execution. It is best to avoid exec
as unlike the builtin commands, it runs the risk of getting init "stuck".
service nvram_customop /system/bin/nvram_customop
user root
oneshot
disabled
on property:nvram_init=Ready
start nvram_customop
init.rc中使用exec起program访问NvRam数据导致开机卡住
写法举例:exec /system/xbin/myprog
[root Cause]
当myprog采用exec方式, init过程执行到这部分内容时, init需要一直等待直至exec myprog完成才能继续,最终导致系统被卡住。
\\alps\system\core\init\readme.txt 中有对exec这个command的用法做详细描述:
[Solution]
在init.rc中start一个service去做此类动作,就可以避免stuck问题。
e.g.,
exec <path> [ <argument> ]*
Fork and execute a program (<path>). This will block until the program completes execution. It is best to avoid exec
as unlike the builtin commands, it runs the risk of getting init "stuck".
service nvram_customop /system/bin/nvram_customop
user root
oneshot
disabled
on property:nvram_init=Ready
start nvram_customop
