Date: Tue, 16 Feb 2016 14:22:18 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 207248] [patch] daemon(8): Add option to redirect stdout and stderr to a file Message-ID: <bug-207248-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207248 Bug ID: 207248 Summary: [patch] daemon(8): Add option to redirect stdout and stderr to a file Product: Base System Version: 10.2-RELEASE Hardware: Any OS: Any Status: New Keywords: patch Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: me@cschwarz.com Keywords: patch Created attachment 167080 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D167080&action= =3Dedit Patch for daemon(8) and its man page enabling IO redirection. Some applications that are daemonized using daemon(8) do not provide means = to write log files. stdout / stderr is their only way to provide output. While this behavior is debatable, we already built a tool that deals with applications that do not daemonize themselves, daemon(8). Currently, daemon(8) only has a flag `-f` to redirect both stdout and stder= r to /dev/null. Setting the flag causes the daemon(3) call to be called with daemon(*, 0). However, daemon(3) does not provide means to specify alternative redirection destinations. The patch attached to this bug report adds flags `-e`, `-o` and `-a` to daemon(8) that can be used instead of `-f` to redirect stderr and stdout to specified file paths. `-a` is used to toggle appending instead of overwriting the specified path. The man page has been updated to reflect the changes made to the source cod= e. The flags have been chosen semantically and syntactically identical to `http://software.clapper.org/daemonize/` which is a tool available both in = many Linux distributions and in the ports tree. However, I would like to see the features implemented in this patch in the = base system. (Naturally, ) I think the code provided by this patch is much more straight forward and cleaner than the aforementioned third party tool. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-207248-8>