mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-06-25 06:35:17 -04:00
Fix decode button getting stuck on first decode cycle.
The ".quit" file that is used to communicate shutdown to the "jt9" sub-process was not getting deleted under some obscure circumstances. If "wsjtx" is started with the ".quit" file in place; "jt9" starts and stops immediately rather than going into it's normal wait state. Probably some sort of race condition between the two processes dying and file and/or shared memory locks. Rather than track the issue down I have added code to ensure that ".quit" is removed before starting "jt9". git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3586 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
8263c52240
commit
aec3834739
@ -326,10 +326,23 @@ MainWindow::MainWindow(QSettings * settings, QSharedMemory *shdmem, QString *the
|
|||||||
ui->bandComboBox->addItems(m_bandDescription);
|
ui->bandComboBox->addItems(m_bandDescription);
|
||||||
ui->bandComboBox->setCurrentIndex(m_band);
|
ui->bandComboBox->setCurrentIndex(m_band);
|
||||||
|
|
||||||
|
{
|
||||||
|
//delete any .quit file that might have been left lying around
|
||||||
|
//since its presence will cause jt9 to exit a soon as we start it
|
||||||
|
//and decodes will hang
|
||||||
|
QString quitFileName (m_appDir + "/.quit");
|
||||||
|
QFile quitFile (quitFileName);
|
||||||
|
while (quitFile.exists ())
|
||||||
|
{
|
||||||
|
if (!quitFile.remove ())
|
||||||
|
{
|
||||||
|
msgBox ("Error removing " + quitFileName + " - OK to retry.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QFile lockFile(m_appDir + "/.lock"); //Create .lock so jt9 will wait
|
QFile lockFile(m_appDir + "/.lock"); //Create .lock so jt9 will wait
|
||||||
lockFile.open(QIODevice::ReadWrite);
|
lockFile.open(QIODevice::ReadWrite);
|
||||||
//QFile quitFile(m_appDir + "/.lock");
|
|
||||||
//quitFile.remove();
|
|
||||||
|
|
||||||
// Multiple instances: make the Qstring key into command line arg
|
// Multiple instances: make the Qstring key into command line arg
|
||||||
// Multiple instances: start "jt9 -s <thekey>"
|
// Multiple instances: start "jt9 -s <thekey>"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user