1

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

Zaffy
  • 16,801
  • 8
  • 50
  • 77

2 Answers2

2

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

stark
  • 12,615
  • 3
  • 33
  • 50
2

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.

James Youngman
  • 3,623
  • 2
  • 19
  • 21