rendered paste body
#include <stdlib.h>
// (...)
QString command = cmd;
/* vExecCommand */
p = new KShellProcess;
/* dcop */
if(newDcop == true) {
int fd;
// int oldumask = umask(077);
cookie = new KCookie();
char iceauthority[] = "/tmp/iceauth.XXXXXXXXXX";
QCString ksycoca = QFile::encodeName(locateLocal("cache", "ksycoca"));
p->setEnvironment("KDESYCOCA",ksycoca);
p->setEnvironment("DCOPSERVER",cookie->dcopServer());
fd = mkstemp(iceauthority);
// umask(oldumask);
close(fd);
p->setEnvironment("ICEAUTHORITY",iceauthority);
}