gnome-session-inhibit passes arguments to execvp incorrectly

Bug #1639536 reported by Pauli
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-session (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

steps to reproduce:

gnome-session-inhibit sh -c "sleep 10"

Excepted result is of course wait for 10 seconds before termination.

Actual result:
Failed to open "sleep 10"

That is causes because shell ignores the first argument that should be the program name. But inhibit passes "-c" as the first argument.

Attached patch fixes the inhibit to work correctly. Exactly like sudo, parallel, systemd-inhibit or any similar program works.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: gnome-session-bin 3.20.2-1ubuntu7
ProcVersionSignature: Ubuntu 4.8.0-26.28-generic 4.8.0
Uname: Linux 4.8.0-26-generic x86_64
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CurrentDesktop: GNOME
Date: Sun Nov 6 07:22:38 2016
InstallationDate: Installed on 2037-12-25 (-7719 days ago)
InstallationMedia: Lubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: gnome-session
UpgradeStatus: Upgraded to yakkety on 2016-10-21 (15 days ago)

Revision history for this message
Pauli (paniemin) wrote :
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-session (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thank you for reporting this bug to Ubuntu.
Ubuntu 16.10 (yakkety) reached end-of-life on July 20, 2017.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in and change the bug status to Confirmed.

Changed in gnome-session (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gnome-session (Ubuntu) because there has been no activity for 60 days.]

Changed in gnome-session (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.