]> git.proxmox.com Git - mirror_corosync.git/commit
[PATCH] Replace freopen with open/dup2 when daemonizing
authorChristine Caulfield <ccaulfie@redhat.com>
Tue, 10 Sep 2013 14:33:31 +0000 (15:33 +0100)
committerChristine Caulfield <ccaulfie@redhat.com>
Tue, 10 Sep 2013 14:33:31 +0000 (15:33 +0100)
commit8567887abb09d2e0e1a6908f6137b20b67253d39
tree6229defc86cc3d77c23314300a46c4d7adc99cfc
parent366362257682322217caf0c8e872ae257420ca23
[PATCH] Replace freopen with open/dup2 when daemonizing

This patch replaces the existing freopen method of
forcing stdin/out/err to /dev/null with the more
usual system of open/dup2.

While I don't like posting patches I don't fully understand,
this patch seems to fix a problem where stdout/err get
assigned to a socket causing double logging output
on systemd.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
exec/main.c