os2: return an error code correctly when a child was signaled
For example, a child process terminates due to abort().
    modified:   os2.c
			
			
This commit is contained in:
		
							
								
								
									
										3
									
								
								os2.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								os2.c
									
									
									
									
									
								
							| @@ -478,6 +478,9 @@ int execve(const char *name, char * const *argv, char * const *envp) | |||||||
| 	/* Is this possible ? And is this right ? */ | 	/* Is this possible ? And is this right ? */ | ||||||
| 	if (rc == -1) | 	if (rc == -1) | ||||||
| 		return -1; | 		return -1; | ||||||
|  |  | ||||||
|  | 	if (WIFSIGNALED(status)) | ||||||
|  | 		_exit(ksh_sigmask(WTERMSIG(status))); | ||||||
|  |  | ||||||
| 	_exit(WEXITSTATUS(status)); | 	_exit(WEXITSTATUS(status)); | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user