Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 67161 - Firefox script returns code zero on Firefox failure
Summary: Firefox script returns code zero on Firefox failure
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-11 15:06 UTC by Philip Webb
Modified: 2004-11-15 14:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Webb 2004-10-11 15:06:28 UTC
The command

  firefox -a firefox -remote openurl\("file://$URL",new-window\)

returns zero upon failure.
This causes a problem when trying to use Xfce4 help files,
as the script for starting them contains the lines

   case $BROWSER in
    firefox*)
      $BROWSER -a firefox -remote openurl\("file://$URL",new-window\) || \
        $BROWSER "file://$URL"

When the 1st command fails, the return code is zero & the 2nd command doesn't start.



Reproducible: Always
Steps to Reproduce:
1.  Install the Xfce4 desktop manager
2.  When running it, click on the 'XFCE 4 Manual' button
3.

Actual Results:  
The help file does not appear 

Expected Results:  
Firefox should have started with the Xfce4 help index. 

This problem was discovered while using Xfce 4.1.90 & Firefox 1.0_pre-r2 . 
I realise that the version of Xfce is not yet included in Gentoo stable, 
but the problem arises inside the current Gentoo Firefox start script; 
it also happens if the user tries to use Mozilla instead. 
The Firefox/Mozilla scripts should always return non-zero on failure to start.
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-11-15 14:04:12 UTC
Fixed in mozilla-launcher-1.23.  Note that bare exit is the same as "exit $?"

@@ -56,7 +56,7 @@
   # instance.
   if [[ ${#args[@]} -gt 0 ]] || ! try_running 'ping()'; then
     # Assume the first url should just be tacked on the end.
-    try_start "${args[@]}" ${urls:+"${urls[0]}"}
+    try_start "${args[@]}" ${urls:+"${urls[0]}"} || exit
     set -- "${urls[@]}"; shift; urls=("$@")   # shift off the first url
     candidates=$DISPLAY
     args=()