Will rc.local block until command finish execution?

半腔热情 提交于 2019-12-24 11:29:23

问题


Will rc.local wait for each command to finish, or the commands are executed like exec() ?


回答1:


It's a normal shell script. So they block or not, according to how the script invokes the commands (e.g. with/without &).

But exec also works differently to how you appear to think; exec() doesn't do anything asynchronously.




回答2:


They block. They can be run asynchronously by putting '&' at the end.



来源:https://stackoverflow.com/questions/10790465/will-rc-local-block-until-command-finish-execution

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!