fix goroutines leak and exit code

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)

Signed-off-by: Victor Vieux <vieux@docker.com>
Merge pull request #7301 from vieux/fix_goroutines_leak_exit_code

fix goroutines leak and exit code
add test

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
reload links of parents when started

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
update feedback

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
update upon feedback and add test log

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
add doc from @SvenDowideit

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: vieux)
only update the needed line instead of rewriting the whole file

Signed-off-by: Victor Vieux <vieux@docker.com>