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 320535 - dogtail-run-headless throws away return value from xinit
dogtail-run-headless throws away return value from xinit
Status: RESOLVED FIXED
Product: dogtail
Classification: Deprecated
Component: Framework
CVS HEAD
Other Linux
: Normal normal
: ---
Assigned To: Dogtail Maintainers
Dogtail Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-11-02 17:13 UTC by Dave Malcolm
Modified: 2005-11-02 22:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to save exit code of xinit and exit dogtail-run-headless with it (619 bytes, patch)
2005-11-02 17:15 UTC, Dave Malcolm
none Details | Review
patch to save exit code of arguments passed to dogtail-run-headless and exit with it (964 bytes, patch)
2005-11-02 21:28 UTC, Zack Cerza
none Details | Review
patch to save exit code of arguments passed to dogtail-run-headless and exit with it (996 bytes, patch)
2005-11-02 22:41 UTC, Zack Cerza
committed Details | Review

Description Dave Malcolm 2005-11-02 17:13:44 UTC
Assuming my shell-fu is correct, dogtail-run-headless currently always returns
an implicit successful exit value.

"dogtail-run-headless true" 
and
"dogtail-run-headless false"

ought to have success/failure exit codes respectively, but currently both have
an implicit success exit code
Comment 1 Dave Malcolm 2005-11-02 17:15:17 UTC
Created attachment 54239 [details] [review]
Patch to save exit code of xinit and exit dogtail-run-headless with it
Comment 2 Dave Malcolm 2005-11-02 18:41:50 UTC
To reproduce, try:
dogtail-run-headless false
echo $?

Without the patch I get this output:
0
(a success code, even though I failed to connect to the X server due to some
auth issue, and the script would have been a failure had it been run)

With the patch I get this output:
1
(i.e. an error code, as it should be; having said that, the xinit is failing to
auth against the Xvfb in my tests for some reason)
Comment 3 Zack Cerza 2005-11-02 21:27:15 UTC
With this patch, dogtail-run-headless still exits with 0 every time. I tried
'/bin/false' and 'exit 5'.

Here's a patch that I wrote, that works for me. It uses the actual return code
of the arguments you pass to dogtail-run-headless, instead of relying on xinit
to be faithful. Please test.
Comment 4 Zack Cerza 2005-11-02 21:28:27 UTC
Created attachment 54247 [details] [review]
patch to save exit code of arguments passed to dogtail-run-headless and exit with it
Comment 5 Zack Cerza 2005-11-02 22:41:34 UTC
Created attachment 54249 [details] [review]
patch to save exit code of arguments passed to dogtail-run-headless and exit with it
Comment 6 Zack Cerza 2005-11-02 22:42:00 UTC
Committed.