After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 690273 - gnome-session --version exits with 1 instead of 0
gnome-session --version exits with 1 instead of 0
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
3.7.x
Other Linux
: Normal trivial
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-15 20:51 UTC by Janne Haapsaari
Modified: 2012-12-15 21:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
This patch changes gnome-session --version exit value from 1 to 0. (853 bytes, patch)
2012-12-15 20:55 UTC, Janne Haapsaari
accepted-commit_now Details | Review

Description Janne Haapsaari 2012-12-15 20:51:55 UTC
Description:
When executing gnome-session --version program print version string as expected but exit value is 1. This is in my opinion problematic because in many cases exit value != 0 is interpreted as an error value.

Steps to reproduce:
1. Run gnome-session --version
2. To see exit value run: echo $? 

Expected result:
gnome-session --version should print out version string and give 0 as a exit value.

Actual result:
gnome-session --version prints out version string and gives 1 as a exit value.

Does this happen every time?
Yes it does. I have tested it with 3.6.2 but also git master seems to exit with value 1.

Other information:
I tried searching whether this is intentional or not but were unable to find such information. Then I did check gnome-shell sources and in a similar situation gnome-shell exits with value 0.
Comment 1 Janne Haapsaari 2012-12-15 20:55:29 UTC
Created attachment 231634 [details] [review]
This patch changes gnome-session --version exit value from 1 to 0.

Trivial patch for the bug.
Comment 2 Colin Walters 2012-12-15 20:57:05 UTC
Review of attachment 231634 [details] [review]:

Sure.