[PC-BSD Commits] r19036 - pcbsd-projects/PCDM

svn at pcbsd.org svn at pcbsd.org
Tue Sep 11 07:54:02 PDT 2012


Author: kenmoore
Date: 2012-09-11 14:54:02 +0000 (Tue, 11 Sep 2012)
New Revision: 19036

Modified:
   pcbsd-projects/PCDM/pcdm-backend.cpp
Log:
Try a different method for starting up the logis scripts.



Modified: pcbsd-projects/PCDM/pcdm-backend.cpp
===================================================================
--- pcbsd-projects/PCDM/pcdm-backend.cpp	2012-09-11 14:46:47 UTC (rev 19035)
+++ pcbsd-projects/PCDM/pcdm-backend.cpp	2012-09-11 14:54:02 UTC (rev 19036)
@@ -128,6 +128,11 @@
   p->waitForStarted();
   Backend::log("Startup Environment: " + p->processEnvironment().toStringList().join(" ") );  
   // Run any startup scripts as child processes
+  QProcess ch(p);
+  ch.setStandardOutputFile("/usr/local/share/PCDm/PCDM.log",QIODevice::Append);
+  ch.setProcessEnvironment(environ);
+  ch.start("/bin/sh",child);
+  /*
   QList<QProcess*> childrenL;
   for(int i=0; i<child.length(); i++){
     childrenL.append( new QProcess(p) ); // "p" is the parent of "ch"
@@ -137,13 +142,14 @@
     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++){
+  /*for(int i=0; i<childrenL.length(); i++){
     childrenL[i]->terminate();  
-  }
+  }*/
+  ch.terminate();
   saveUsername.clear(); 
   saveX.clear();
 }



More information about the Commits mailing list