Index: trunk/ppStack/src/ppStackFinish.c
===================================================================
--- trunk/ppStack/src/ppStackFinish.c	(revision 27107)
+++ trunk/ppStack/src/ppStackFinish.c	(revision 27108)
@@ -94,7 +94,10 @@
 
 
-psExit ppStackExitCode(void)
+psExit ppStackExitCode(psExit exitValue)
 {
-    psExit exitValue = PS_EXIT_SUCCESS;        // Exit code to return
+    if (exitValue != PS_EXIT_SUCCESS) {
+        return exitValue;
+    }
+
     psErrorCode errorCode = psErrorCodeLast(); // Error code
     if (errorCode != PS_ERR_NONE) {
