multipathd: Disassociate from /dev/console when daemonizing
authorAnkit Jain <jankit@suse.de>
Wed, 11 May 2011 17:44:24 +0000 (23:14 +0530)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 16 May 2011 18:10:32 +0000 (20:10 +0200)
commitc0a92138b545b25bd7c99502b25fd9fbcaf1b328
tree1bc7c0fb14eb0b542bc482fcad7696fb7587922b
parent50192396d7bd3d802d9529550e0229d9beaa9afc
multipathd: Disassociate from /dev/console when daemonizing

Currently, multipathd redirects stdout/stderr to /dev/console,
to be able to show error messages when all else fails.

This patch redirects them to /dev/null instead, to make it a
well behaving daemon. This corresponds to FATE request
https://fate.novell.com/310684 .

This is based on -
git://git.kernel.org/pub/scm/linux/storage/multipath-tools/

----
commit a3dd997d1b0b55a934103e0b28648003675743e3
Author: Ankit Jain <jankit@suse.de>
Date:   Wed May 11 22:18:33 2011 +0530

    multipathd: Disassociate from /dev/console

    When daemonizing, redirect stdout/stderr to /dev/null
    instead of /dev/console. Also, chdir("/") before the redirection,
    so that any error can be reported.
    FATE#310684.
multipathd/main.c