* Pid::kill() should be interruptable.
This commit is contained in:
		
							parent
							
								
									7951c3c546
								
							
						
					
					
						commit
						363f40022f
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -685,9 +685,11 @@ void Pid::kill() | ||||||
| 
 | 
 | ||||||
|     /* Wait until the child dies, disregarding the exit status. */ |     /* Wait until the child dies, disregarding the exit status. */ | ||||||
|     int status; |     int status; | ||||||
|     while (waitpid(pid, &status, 0) == -1) |     while (waitpid(pid, &status, 0) == -1) { | ||||||
|  |         checkInterrupt(); | ||||||
|         if (errno != EINTR) printMsg(lvlError, |         if (errno != EINTR) printMsg(lvlError, | ||||||
|             (SysError(format("waiting for process %1%") % pid).msg())); |             (SysError(format("waiting for process %1%") % pid).msg())); | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     pid = -1; |     pid = -1; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue