• Chengwei Yang's avatar
    Handle activated child stdout/stderr correctly in systemd environment · 5be1e778
    Chengwei Yang authored
    In systemd environment, dbus-daemon will run as no-fork mode since this
    is the recommended practice of systemd.
    
    In that scenario, child activated by dbus-daemon will inherit
    dbus-daemon standard streams, includes stdin/stdout/stderr. stdin will
    be redirected to /dev/null by systemd and stdout/stderr will be catched
    by systemd log subsystem. Since the child inherit stdout/stderr from
    dbus-daemon, so from systemd journal log, the child log output will be
    identified with dbus-daemon identifier. So it's a little confusing.
    
    This patch redirects the child stdout/stderr to systemd journal stream,
    and with its owned service name as identifier. However, thing not fixed
    perfectly due to the socket ucred of the child is owned by dbus-daemon,
    so the pid isn't the real pid of the chile.
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68559Reviewed-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
    5be1e778
Name
Last commit
Last update
bus Loading commit data...
cmake Loading commit data...
dbus Loading commit data...
doc Loading commit data...
m4 Loading commit data...
test Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
ChangeLog.pre-1-0 Loading commit data...
ChangeLog.pre-1-2 Loading commit data...
Doxyfile.in Loading commit data...
HACKING Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
Makefile.cvs Loading commit data...
NEWS Loading commit data...
NEWS.pre-1-0 Loading commit data...
NEWS.pre-1-2 Loading commit data...
README Loading commit data...
README.cmake Loading commit data...
README.cygwin Loading commit data...
README.launchd Loading commit data...
README.valgrind Loading commit data...
README.win Loading commit data...
README.wince Loading commit data...
autogen.sh Loading commit data...
cleanup-man-pages.sh Loading commit data...
configure.ac Loading commit data...
dbus-1-uninstalled.pc.in Loading commit data...
dbus-1.pc.in Loading commit data...