chg: do not release semaphore 0 while waiting for links
(cherry picked from commit 2a070c518144f438f8eefc065884effa6406572f)

Signed-off-by: Andreas Steenpass <steenpass@mathematik.uni-kl.de>