From 5a365890238f8c5c3705ba747027e648f75026b6 Mon Sep 17 00:00:00 2001 From: espie Date: Mon, 8 Apr 2002 17:59:57 +0000 Subject: [PATCH] fix pval's brain-damaged patch. --- .../patches/patch-kdecore_kuniqueapp_cpp | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/x11/kde/libs2/patches/patch-kdecore_kuniqueapp_cpp b/x11/kde/libs2/patches/patch-kdecore_kuniqueapp_cpp index 4d98f0f3b92..8b827505341 100644 --- a/x11/kde/libs2/patches/patch-kdecore_kuniqueapp_cpp +++ b/x11/kde/libs2/patches/patch-kdecore_kuniqueapp_cpp @@ -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())