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 | 29 | private static $nbMaxProcessByUser = 10; |
30 | 30 | private static $nbMaxProcessGlobal = 100; |
31 | 31 | |
32 | + private static $isDebugMode = FALSE; | |
33 | + | |
32 | 34 | |
33 | 35 | private static $userHost = ""; |
34 | 36 | private static $userName = ""; |
... | ... | @@ -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 | 60 | public static function setUserHost($userHost) |
54 | 61 | { |
55 | 62 | self::$userHost = $userHost; |
... | ... | @@ -167,7 +174,7 @@ class KernelConfigClass |
167 | 174 | "DDPATH" => KERNEL_CONFIG_DIR, |
168 | 175 | "MY_GXX_HOME" => GCC_BASE_DIR, |
169 | 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 | 350 | if (!isset($process)) |
351 | 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 | 355 | $dom->documentElement->removeChild($processNode); |
356 | 356 | ... | ... |