fix pval's brain-damaged patch.

This commit is contained in:
espie 2002-04-08 17:59:57 +00:00
parent c9eedae4dd
commit 5a36589023

View File

@ -1,12 +1,30 @@
$OpenBSD: patch-kdecore_kuniqueapp_cpp,v 1.1 2002/03/30 01:44:28 pvalchev Exp $
--- kdecore/kuniqueapp.cpp.orig Fri Mar 29 18:36:40 2002
+++ kdecore/kuniqueapp.cpp Fri Mar 29 18:36:11 2002
@@ -130,7 +130,7 @@ KUniqueApplication::start()
}
DCOPClient *dc;
int fd[2];
- char result;
+ int result;
if (0 > pipe(fd))
{
kdError() << "KUniqueApplication: pipe() failed!" << endl;
$OpenBSD: patch-kdecore_kuniqueapp_cpp,v 1.2 2002/04/08 17:59:57 espie Exp $
--- kdecore/kuniqueapp.cpp.orig Mon Apr 8 19:49:32 2002
+++ kdecore/kuniqueapp.cpp Mon Apr 8 19:51:31 2002
@@ -153,7 +153,7 @@ KUniqueApplication::start()
if (QCString(getenv("DISPLAY")).isEmpty())
{
kdError() << "KUniqueApplication: Can't determine DISPLAY. Aborting." << endl;
- result = -1; // Error
+ result = 1; // Error
::write(fd[1], &result, 1);
::exit(255);
}
@@ -164,7 +164,7 @@ KUniqueApplication::start()
if (regName.isEmpty())
{
kdError() << "KUniqueApplication: Can't setup DCOP communication." << endl;
- result = -1;
+ result = 2;
delete dc; // Clean up DCOP commmunication
::write(fd[1], &result, 1);
::exit(255);
@@ -241,7 +241,7 @@ KUniqueApplication::start()
::close(fd[0]);
if (result != 0)
- ::exit(result); // Error occured in child.
+ ::exit(255); // Error occured in child.
dc = new DCOPClient();
if (!dc->attach())