logger: detect death of its parent process in a correct manner

init process doesn't always be a parent of logger process even sheep
process dies. It depends on execution environment. This patch
implements a correct way of detecting death of sheep process in logger
process.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>