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.