← Back to team overview

desktop-packages team mailing list archive

[Bug 1339244] Re: Comparison of exit_status in run_custom_command is wrong


Considering the fact that this bug makes it difficult to use a custom
input device configuration in Ubuntu 14.04, I will try to make the case
for a Trusty SRU. I normally use the hotplug-command facility to
configure touchpad parameters that aren't exposed by the GNOME UI. FWIW,
I can confirm that the Utopic package (Which includes the fix) works
without issues.


* Due to this bug, using a custom input device configuration is made
unnecessarily difficult out-of-the-box with 14.04. The GNOME
documentation asserts that the "official" way of doing persistent custom
persistent device configurations is by using the hotplug-command
GSettings Entry combined with a shell script. This, however, does not
work at the time of writing.

* As a result, a user who wishes to use a custom input device
configuration is forced to use less-than-optimal workarounds such as
disabling the GSettings "mouse" plugin altogether, which also has the
potentially unwanted side-effect of disabling the Mouse/Touchpad
configuration UI as well.

[Test Case]

* A simple test program is included within the description of the
upstream GNOME Bug: https://bugzilla.gnome.org/show_bug.cgi?id=710791
and can be used to confirm that GSD is getting the correct exit code.

[Regression Potential]

* Minimal. The proposed patch only fixes the extraction/comparison of
the exit status and has been proven to work on 14.10.

You received this bug notification because you are a member of Desktop
Packages, which is subscribed to unity-settings-daemon in Ubuntu.

  Comparison of exit_status in run_custom_command is wrong

Status in Gnome Settings Daemon:
  Fix Released
Status in gnome-settings-daemon package in Ubuntu:
  Fix Released
Status in unity-settings-daemon package in Ubuntu:
Status in gnome-settings-daemon source package in Trusty:
Status in unity-settings-daemon source package in Trusty:

Bug description:
  In file /plugins/common/gsd-input-helper.c in function
  run_custom_command the variable exit_status doesn't contain the exit
  status of the process, so the statement "return (exit_status == 1);"
  is wrong.

  The documentation (https://developer.gnome.org/glib/stable/glib-Spawning-Processes.html#g-spawn-sync) says:
  exit_status    return location for child exit status, as returned by waitpid(), or NULL.

  And in the documentation of waitpid
  (http://linux.die.net/man/2/waitpid) exit_status is described.

  You have to do something like this:
  if (WIFEXITED(exit_status) == FALSE) {
      return FALSE;
  return (WEXITSTATUS(exit_status) == 1);

To manage notifications about this bug go to: