[Portland-bugs] [Bug 107995] New: Weird back-quoting in xdg-utils-common.in
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Sep 20 07:41:01 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=107995
Bug ID: 107995
Summary: Weird back-quoting in xdg-utils-common.in
Product: Portland
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: xdg-utils
Assignee: portland-bugs at lists.freedesktop.org
Reporter: alexl at redhat.com
This code in xdg-utils-common.in seems weird:
https://github.com/freedesktop/xdg-utils/blob/master/scripts/xdg-utils-common.in#L317
copied here:
elif `dbus-send --print-reply --dest=org.freedesktop.DBus
/org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner
string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
Why are we running dbus-send and then executing its output, after having sent
it to /dev/null.
It seems to get the right result:
$ if `false > /dev/null`; then echo YES; fi
$ if `true > /dev/null`; then echo YES; fi
YES
But, why?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/portland-bugs/attachments/20180920/214cb199/attachment.html>
More information about the Portland-bugs
mailing list