[PC-BSD Commits] r19033 - pcbsd-projects/PCDM
svn at pcbsd.org
svn at pcbsd.org
Tue Sep 11 06:32:44 PDT 2012
Author: kenmoore
Date: 2012-09-11 13:32:44 +0000 (Tue, 11 Sep 2012)
New Revision: 19033
Modified:
pcbsd-projects/PCDM/pcdm-backend.cpp
Log:
Fixup the login script startup routine for PCDM
Modified: pcbsd-projects/PCDM/pcdm-backend.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-backend.cpp 2012-09-11 09:18:09 UTC (rev 19032)
+++ pcbsd-projects/PCDM/pcdm-backend.cpp 2012-09-11 13:32:44 UTC (rev 19033)
@@ -128,17 +128,22 @@
p->waitForStarted();
Backend::log("Startup Environment: " + p->processEnvironment().toStringList().join(" ") );
// Run any startup scripts as child processes
+ QList<QProcess*> childrenL;
for(int i=0; i<child.length(); i++){
- QProcess ch(p); // "p" is the parent of "ch", and inherits the same environment
- ch.setStandardOutputFile("/usr/local/share/PCDM/PCDM.log",QIODevice::Append); //log any output
+ childrenL.append( new QProcess(p) ); // "p" is the parent of "ch"
+ childrenL[i]->setStandardOutputFile("/usr/local/share/PCDM/PCDM.log",QIODevice::Append); //log any output
+ childrenL[i]->setProcessEnvironment(environ);
Backend::log("Starting script: "+child[i]);
- Backend::log("Child Environment: "+ch.processEnvironment().toStringList().join(" "));
- ch.start(child[i]); // As a child, it will close down once the parent closes
+ Backend::log("Child Environment: "+childrenL[i]->processEnvironment().toStringList().join(" "));
+ childrenL[i]->start(child[i]);
}
// Now Wait for the process to finish
p->waitForFinished(-1); //do not time-out
//XSession stopped, now clean up
+ for(int i=0; i<childrenL.length(); i++){
+ childrenL[i]->terminate();
+ }
saveUsername.clear();
saveX.clear();
}
More information about the Commits
mailing list