summaryrefslogtreecommitdiff
path: root/core/launcher
Unidiff
Diffstat (limited to 'core/launcher') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/qprocess_unix.cpp6
-rw-r--r--core/launcher/server.cpp19
2 files changed, 19 insertions, 6 deletions
diff --git a/core/launcher/qprocess_unix.cpp b/core/launcher/qprocess_unix.cpp
index 97c0460..3125bcc 100644
--- a/core/launcher/qprocess_unix.cpp
+++ b/core/launcher/qprocess_unix.cpp
@@ -310,13 +310,17 @@ void QProcessManager::removeMe()
310 } 310 }
311} 311}
312 312
313void QProcessManager::sigchldHnd( int fd ) 313void QProcessManager::sigchldHnd( int fd )
314{ 314{
315 char tmp; 315 char tmp;
316 ::read( fd, &tmp, sizeof(tmp) ); 316 if (::read( fd, &tmp, sizeof(tmp) ) < 0)
317#if defined(QT_QPROCESS_DEBUG)
318 odebug << "QProcessManager::sigchldHnd() failed dummy read of file descriptor" << oendl;
319#endif
320 ;
317#if defined(QT_QPROCESS_DEBUG) 321#if defined(QT_QPROCESS_DEBUG)
318 odebug << "QProcessManager::sigchldHnd()" << oendl; 322 odebug << "QProcessManager::sigchldHnd()" << oendl;
319#endif 323#endif
320 QProc *proc; 324 QProc *proc;
321 QProcess *process; 325 QProcess *process;
322 bool removeProc; 326 bool removeProc;
diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp
index 921b790..c45265a 100644
--- a/core/launcher/server.cpp
+++ b/core/launcher/server.cpp
@@ -364,22 +364,30 @@ void Server::systemMsg(const QCString &msg, const QByteArray &data)
364 QString baseFile, sigFile, deltaFile; 364 QString baseFile, sigFile, deltaFile;
365 stream >> baseFile >> sigFile >> deltaFile; 365 stream >> baseFile >> sigFile >> deltaFile;
366 QRsync::generateDiff( baseFile, sigFile, deltaFile ); 366 QRsync::generateDiff( baseFile, sigFile, deltaFile );
367 } else if ( msg == "rdiffApplyPatch(QString,QString)" ) { 367 } else if ( msg == "rdiffApplyPatch(QString,QString)" ) {
368 QString baseFile, deltaFile; 368 QString baseFile, deltaFile;
369 stream >> baseFile >> deltaFile; 369 stream >> baseFile >> deltaFile;
370 bool fileWasCreated = false;
370 if ( !QFile::exists( baseFile ) ) { 371 if ( !QFile::exists( baseFile ) ) {
371 QFile f( baseFile ); 372 QFile f( baseFile );
372 f.open( IO_WriteOnly ); 373 fileWasCreated = f.open( IO_WriteOnly );
373 f.close(); 374 f.close();
374 } 375 }
375 QRsync::applyDiff( baseFile, deltaFile ); 376 if ( fileWasCreated ) {
377 QRsync::applyDiff( baseFile, deltaFile );
376#ifndef QT_NO_COP 378#ifndef QT_NO_COP
377 QCopEnvelope e( "QPE/Desktop", "patchApplied(QString)" ); 379 QCopEnvelope e( "QPE/Desktop", "patchApplied(QString)" );
378 e << baseFile; 380 e << baseFile;
379#endif 381#endif
382 } else {
383#ifndef QT_NO_COP
384 QCopEnvelope e( "QPE/Desktop", "patchUnapplied(QString)" );
385 e << baseFile;
386#endif
387 }
380 } else if ( msg == "rdiffCleanup()" ) { 388 } else if ( msg == "rdiffCleanup()" ) {
381 mkdir( "/tmp/rdiff" ); 389 mkdir( "/tmp/rdiff" );
382 QDir dir; 390 QDir dir;
383 dir.setPath( "/tmp/rdiff" ); 391 dir.setPath( "/tmp/rdiff" );
384 QStringList entries = dir.entryList(); 392 QStringList entries = dir.entryList();
385 for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it ) 393 for ( QStringList::Iterator it = entries.begin(); it != entries.end(); ++it )
@@ -995,12 +1003,13 @@ void Server::startSoundServer() {
995 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)), 1003 connect(process, SIGNAL(processExited(Opie::Core::OProcess*)),
996 SLOT(soundServerExited())); 1004 SLOT(soundServerExited()));
997 } 1005 }
998 1006
999 process->clearArguments(); 1007 process->clearArguments();
1000 *process << QPEApplication::qpeDir() + "bin/qss"; 1008 *process << QPEApplication::qpeDir() + "bin/qss";
1001 process->start(); 1009 if (!process->start())
1010 owarn << "Sound server process did not start" << oendl;
1002} 1011}
1003 1012
1004void Server::soundServerExited() { 1013void Server::soundServerExited() {
1005 QTimer::singleShot(5000, this, SLOT(startSoundServer())); 1014 QTimer::singleShot(5000, this, SLOT(startSoundServer()));
1006} 1015}