On 11/23/2011 07:48 PM, Claus Regelmann wrote:
On 11/23/2011 09:45 AM, Wayne Blaszczyk wrote:
On 23/11/11 20:30, Jaime Cabrera wrote:
As a workaround, I invoke xulrunner with the path and filename of firefox
application.ini as argument instead of invoking firefox. It seems it works
Can you give the exact command sequence.
Thanks,
Wayne.
*rgc@rgc4:~$ xulrunner /usr/lib/firefox-8.0.1/application.ini*
I downloaded xulrunner-8.0.1 sources and looked at the code in
.../xulrunner/stub/nsXULStub.cpp.
Here is an example excerpt with my comments:
------------------------------
265 struct stat fileStat;
266 strncpy(tmpPath, argv[0], sizeof(tmpPath)); //!!! copies eg
/usr/bin/firefox -- this is a symlink!!
267 lastSlash = strrchr(tmpPath, '/'); //!!! find the last '/'
268 if (lastSlash) {
269 *lastSlash = 0; //!!! strips off '/firefox'
-- the symlink -- therefore ..
270 realpath(tmpPath, iniPath); //!!! .. realpath(..)
cannot resolve the real path !!!
271 } else {
272 const char *path = getenv("PATH");
273 if (!path)
274 return 1;
275
276 char *pathdup = strdup(path);
277 if (!pathdup)
278 return 1;
279
280 PRBool found = PR_FALSE;
281 char *token = strtok(pathdup, ":");
282 while (token) {
283 sprintf(tmpPath, "%s/%s", token, argv[0]);
284 if (stat(tmpPath, &fileStat) == 0) {
285 found = PR_TRUE;
286 lastSlash = strrchr(tmpPath, '/'); //!!! same problem here
287 *lastSlash = 0; //!!!
288 realpath(tmpPath, iniPath); //!!!
289 break;
290 }
291 token = strtok(NULL, ":");
292 }
---------------------------------------------
This code can never run on a unix system. Correct me if I'm wrong !!!
There are further bugs in this source. Mozilla has to solve them.
We have a work around, and I'll quit.
Claus
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page