Commits

Mark Aufflick committed 0949408

exitstatus wasn't being set at all, but now seems different to the shell. should waitpid be taking a fixed size int or something?

  • Participants
  • Parent commits c7a08ee

Comments (0)

Files changed (1)

 
 	processExitSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_PROC, (uintptr_t)pid, DISPATCH_PROC_EXIT, queue);
 	dispatch_source_set_event_handler(processExitSource, ^(void) {
-		int status = -1;
-		waitpid(launchedPID, &status, /*options*/ 0);
-		PRHTerminationBlock block = (WEXITSTATUS(status) == 0)
+		terminationStatus = -1;
+		waitpid(launchedPID, &terminationStatus, /*options*/ 0);
+		PRHTerminationBlock block = (WEXITSTATUS(terminationStatus) == 0)
 			? [bself successfulTerminationBlock]
 			: [bself abnormalTerminationBlock];
 		dispatch_async(dispatch_get_main_queue(), ^(void) {