Set argv[0] to dbus-launch to avoid misleading info from /proc
authorChengwei Yang <chengwei.yang@intel.com>
Sat, 18 Jan 2014 04:17:43 +0000 (12:17 +0800)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 28 Apr 2014 15:00:11 +0000 (16:00 +0100)
commit3e5b148dcd83e948fa46bbd8e477933df24f6d65
treed9c20b2e631c0a7b03210f873b885f72d00ced9f
parent9383a022747b74bc5d1fe7db57e675c99b9507f1
Set argv[0] to dbus-launch to avoid misleading info from /proc

At previous, argv[0] is the full-qualified path of program, however, if
start dbus-launch failed, it will fall back to find one from $PATH,
while keep the argv[0] as the full-qualified path. So we'll get
misleading info from /proc or ps(1) about dbus-launch process.

One simple solution is just hard-code argv[0] to dbus-launch.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69716
Reviewed-by: Simon McVittie
dbus/dbus-sysdeps-unix.c