Ticket #21973: kdeinit-fork.patch
File kdeinit-fork.patch, 1.6 KB (added by sharky@…, 15 years ago) |
---|
-
kinit/kinit.cpp
old new 489 489 init_startup_info( startup_id, name, envc, envs ); 490 490 #endif 491 491 492 // Don't run this inside the child process, it crashes on OS/X 10.6 493 const QByteArray docPath = QFile::encodeName(KGlobalSettings::documentPath()); 494 #ifdef Q_WS_MAC 495 QString bundlepath = s_instance->dirs()->findExe(QFile::decodeName(execpath)); 496 QString argvexe = s_instance->dirs()->findExe(QString::fromLatin1(_name)); 497 #endif 498 492 499 d.errorMsg = 0; 493 500 d.fork = fork(); 494 501 switch(d.fork) { … … 513 520 if (cwd && *cwd) { 514 521 (void)chdir(cwd); 515 522 } else { 516 const QByteArray docPath = QFile::encodeName(KGlobalSettings::documentPath());517 523 (void)chdir(docPath.constData()); 518 524 } 519 525 … … 552 558 d.argv = (char **) malloc(sizeof(char *) * (argc+1)); 553 559 d.argv[0] = (char *) _name; 554 560 #ifdef Q_WS_MAC 555 QString argvexe = s_instance->dirs()->findExe(QString::fromLatin1(d.argv[0]));556 561 if (!argvexe.isEmpty()) { 557 562 QByteArray cstr = argvexe.toLocal8Bit(); 558 563 kDebug(7016) << "kdeinit4: launch() setting argv: " << cstr.data(); … … 628 633 629 634 QByteArray executable = execpath; 630 635 #ifdef Q_WS_MAC 631 QString bundlepath = s_instance->dirs()->findExe(QFile::decodeName(executable));632 636 if (!bundlepath.isEmpty()) 633 637 executable = QFile::encodeName(bundlepath); 634 638 #endif