Closed Bug 288378 Opened 15 years ago Closed 15 years ago

$ lost when command line args are processed in firefox script


(Toolkit :: Startup and Profile System, defect)

1.7 Branch
Not set





(Reporter: logan+mozilla-bmo, Unassigned)



(1 file)

If firefox is not running and you pass a quoted URI containing a $, the
following word is lost as it's expanded to a variable with the moreargs thing.

firefox '$a/b', results in

As noted in the forum post, I don't know how you'd fix this without removing the
pure/debug checks. If you use single quotes and someone passed an URI containing
one, everything would get screwed up. Use of $moreargs instead of $@ won't work.
Building moreargs with $1 unquoted is probably the best you could do, but of
course that's no good for anything with spaces...

How many people use the pure/debugging stuff anyway? Problems with -p have come
up before (documentation-related). Perhaps all of that could be dumped and some
environment variables ('MOZ_DEBUG=1 MOZ_PURE=1 firefox') used instead.

Maybe someone else will have an idea.
Attached patch patch v1Splinter Review
Is there a reason to have the moreargs (and shift for '*') at all?
Attachment #179144 - Flags: review?(cls)
Comment on attachment 179144 [details] [diff] [review]
patch v1

I don't even know what file this patch is against.  I suspect but it
doesn't match up to any of the files in the tree. 

Afaict, the reason for moreargs is so that you can put the debugging args at
the end of the line instead of alwavs at the beginning.  I'm not sure about the
eval though.  That code originally came from the hardcoded
mozilla/xpfe/bootstrap/mozilla	script.
Attachment #179144 - Flags: review?(cls) → review-
(In reply to comment #2)
> I don't even know what file this patch is against.
It's against the firefox script found in the binary distribution of 1.0.x. Trunk
builds seem to have a different script, there's no test for other running
instances or anything anymore...

I filed this bug for someone else after reading their report on the forum. Can't
say I really care all that much.. That being said, I doubt there would be a huge
interest in replacing the quickly and easily modifiable 'firefox' and
'' with a single c program, but that might be something to consider.

I made a small c wrapper today, which just does an execve() on
and argv[1+]. I didn't bother with the pure/debug or init.d stuff, but that
could be easily added.

Why are there two shell scripts to start firefox anyway?
Assignee: benjamin → nobody
fixed by bug 307185
Closed: 15 years ago
Resolution: --- → FIXED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.