Commit 058077b0751aee1a0824959793a9e82d2b81526f
1 parent
0a7df94d
Exists in
master
and in
8 other branches
Add flag for debug mode
Showing
2 changed files
with
9 additions
and
2 deletions
Show diff stats
src/Request/Config/KernelConfigClass.php
@@ -29,6 +29,8 @@ class KernelConfigClass | @@ -29,6 +29,8 @@ class KernelConfigClass | ||
29 | private static $nbMaxProcessByUser = 10; | 29 | private static $nbMaxProcessByUser = 10; |
30 | private static $nbMaxProcessGlobal = 100; | 30 | private static $nbMaxProcessGlobal = 100; |
31 | 31 | ||
32 | + private static $isDebugMode = FALSE; | ||
33 | + | ||
32 | 34 | ||
33 | private static $userHost = ""; | 35 | private static $userHost = ""; |
34 | private static $userName = ""; | 36 | private static $userName = ""; |
@@ -50,6 +52,11 @@ class KernelConfigClass | @@ -50,6 +52,11 @@ class KernelConfigClass | ||
50 | ); | 52 | ); |
51 | 53 | ||
52 | 54 | ||
55 | + public static function isDebugMode() | ||
56 | + { | ||
57 | + return self::$isDebugMode; | ||
58 | + } | ||
59 | + | ||
53 | public static function setUserHost($userHost) | 60 | public static function setUserHost($userHost) |
54 | { | 61 | { |
55 | self::$userHost = $userHost; | 62 | self::$userHost = $userHost; |
@@ -167,7 +174,7 @@ class KernelConfigClass | @@ -167,7 +174,7 @@ class KernelConfigClass | ||
167 | "DDPATH" => KERNEL_CONFIG_DIR, | 174 | "DDPATH" => KERNEL_CONFIG_DIR, |
168 | "MY_GXX_HOME" => GCC_BASE_DIR, | 175 | "MY_GXX_HOME" => GCC_BASE_DIR, |
169 | "PATH" => self::getKernelBinPath().":".COTS_BASE_DIR."/bin:".GCC_BASE_DIR."/bin:".getenv("PATH"), | 176 | "PATH" => self::getKernelBinPath().":".COTS_BASE_DIR."/bin:".GCC_BASE_DIR."/bin:".getenv("PATH"), |
170 | - "LD_LIBRARY_PATH" => COTS_BASE_DIR."/lib:".GCC_BASE_DIR."/lib64:".GCC_BASE_DIR."/lib:".getenv("LD_LIBRARY_PATH"), | 177 | + "LD_LIBRARY_PATH" => COTS_BASE_DIR."/lib:".COTS_BASE_DIR."/lib64:".GCC_BASE_DIR."/lib64:".GCC_BASE_DIR."/lib:".getenv("LD_LIBRARY_PATH"), |
171 | ); | 178 | ); |
172 | } | 179 | } |
173 | 180 |
src/Request/ProcessRequestImpl/Process/ProcessManagerClass.php
@@ -350,7 +350,7 @@ class ProcessManagerClass | @@ -350,7 +350,7 @@ class ProcessManagerClass | ||
350 | if (!isset($process)) | 350 | if (!isset($process)) |
351 | return array('success' => false, 'message' => 'Error to retrieve process info'); | 351 | return array('success' => false, 'message' => 'Error to retrieve process info'); |
352 | 352 | ||
353 | - $process->delete($process->getExitCode() != 0); | 353 | + $process->delete(($process->getExitCode() != 0) || KernelConfigClass::isDebugMode()); |
354 | 354 | ||
355 | $dom->documentElement->removeChild($processNode); | 355 | $dom->documentElement->removeChild($processNode); |
356 | 356 |