mirror of
				https://github.com/dockur/windows.git
				synced 2025-11-04 06:15:27 +00:00 
			
		
		
		
	fix: Kill QEMU after 5 seconds if it hangs
This commit is contained in:
		
							parent
							
								
									ac106067bd
								
							
						
					
					
						commit
						8e01b2c106
					
				@ -89,15 +89,15 @@ finish() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      sleep 1
 | 
					      sleep 1
 | 
				
			||||||
      cnt=$((cnt+1))
 | 
					      cnt=$((cnt+1))
 | 
				
			||||||
  
 | 
					
 | 
				
			||||||
      # Workaround for zombie pid
 | 
					      # Workaround for zombie pid
 | 
				
			||||||
      [ ! -s "$QEMU_PID" ] && break
 | 
					      [ ! -s "$QEMU_PID" ] && break
 | 
				
			||||||
  
 | 
					
 | 
				
			||||||
      if [ "$cnt" == "5" ]; then
 | 
					      if [ "$cnt" == "5" ]; then
 | 
				
			||||||
        error "QEMU did not terminate itself, forcefully killing process..."
 | 
					        error "QEMU did not terminate itself, forcefully killing process..."
 | 
				
			||||||
        { kill -9 "$pid" || true; } 2>/dev/null
 | 
					        { kill -9 "$pid" || true; } 2>/dev/null
 | 
				
			||||||
      fi
 | 
					      fi
 | 
				
			||||||
  
 | 
					
 | 
				
			||||||
    done
 | 
					    done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user