Bugzilla bug 265219: go to errorExit on DosStartSession failure. r=mkaply. NSPRPUB_PRE_4_2_CLIENT_BRANCH
authorwchang0222%aol.com
Fri, 05 Nov 2004 23:19:29 +0000
branchNSPRPUB_PRE_4_2_CLIENT_BRANCH
changeset 3210 aec2cbbd9a7cd69d2e71d0b19bb57d540c048079
parent 3209 16542b0206728cd04591a069e8fb5a78517515cf
child 3212 dfc6ff203118f47915f5d38d0ba10dacc629fa16
push idunknown
push userunknown
push dateunknown
reviewersmkaply
bugs265219
Bugzilla bug 265219: go to errorExit on DosStartSession failure. r=mkaply. Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
pr/src/md/os2/os2misc.c
--- a/pr/src/md/os2/os2misc.c
+++ b/pr/src/md/os2/os2misc.c
@@ -421,17 +421,18 @@ PRProcess * _PR_CreateOS2Process(
     } else {	
         /*
          * If no STDIN/STDOUT redirection is not needed, use DosStartSession
          * to create a new, independent session
          */
         rc = DosStartSession(&startData, &ulAppType, &pid);
 
         if ((rc != NO_ERROR) && (rc != ERROR_SMG_START_IN_BACKGROUND)) {
-            PR_SetError(PR_UNKNOWN_ERROR, 0);
+            PR_SetError(PR_UNKNOWN_ERROR, rc);
+            goto errorExit;
         }
  
         proc->md.pid = pid;
     }
 
     if (pszFormatResult) {
         PR_DELETE(pszFormatResult);
     }