Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

1
  • In most shells, a subshell forks and in any case, subshell or not, the shell will fork a process to execute that ping command in a separate process as there's no shell that I know that has ping as a builtin command. But the point here is that the shell will wait for the termination of that process. & doesn't make a difference whether the shell forks or not (it forks with and without &) but whether the shell will wait or not for that process to finish before carrying on with the rest of the script. Commented Sep 3, 2018 at 21:30