diff options
author | Robert Xu <robxu9@gmail.com> | 2011-08-13 12:58:51 -0400 |
---|---|---|
committer | Robert Xu <robxu9@gmail.com> | 2011-08-13 12:58:51 -0400 |
commit | 46130378aea5fff80803409c2573e2ea31472cb9 (patch) | |
tree | cb5da908105e6577da7676f84ba9c7fbaba4fb52 /opensuse/tdelibs/kdeprint-restart-cupsd.diff | |
parent | 53f2819f9af035a38ca08df1ede9e6cd24aa79ef (diff) | |
download | tde-packaging-46130378aea5fff80803409c2573e2ea31472cb9.tar.gz tde-packaging-46130378aea5fff80803409c2573e2ea31472cb9.zip |
add dbus-1-tqt and libdbus-1-tqt-0; add unmodified tdelibs from kdelibs3
Diffstat (limited to 'opensuse/tdelibs/kdeprint-restart-cupsd.diff')
-rw-r--r-- | opensuse/tdelibs/kdeprint-restart-cupsd.diff | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/opensuse/tdelibs/kdeprint-restart-cupsd.diff b/opensuse/tdelibs/kdeprint-restart-cupsd.diff new file mode 100644 index 000000000..d464098eb --- /dev/null +++ b/opensuse/tdelibs/kdeprint-restart-cupsd.diff @@ -0,0 +1,32 @@ +Index: kdeprint/cups/cupsdconf2/cupsddialog.cpp +=================================================================== +--- kdeprint/cups/cupsdconf2/cupsddialog.cpp.orig ++++ kdeprint/cups/cupsdconf2/cupsddialog.cpp +@@ -45,6 +45,7 @@ + #include <kguiitem.h> + #include <kprocess.h> + ++#include <stdlib.h> + #include <signal.h> + #include <cups/cups.h> + +@@ -205,15 +206,13 @@ bool CupsdDialog::restartServer(QString& + } + else + { ++ KProcess proc; + bool success = false; + if (getuid() == 0 ) +- success = (::kill(serverPid, SIGHUP) == 0); ++ proc << "rccups" << "force-reload"; + else +- { +- KProcess proc; +- proc << "kdesu" << "-c" << "kill -SIGHUP " + QString::number( serverPid ); +- success = proc.start( KProcess::Block ) && proc.normalExit(); +- } ++ proc << "kdesu" << "-c" << "rccups" << "force-reload"; ++ success = proc.start( KProcess::Block ) && proc.normalExit(); + if( !success ) + msg = i18n("Unable to restart CUPS server (pid = %1)").arg(serverPid); + } |