mirror of
				https://github.com/dockur/windows.git
				synced 2025-11-04 06:15:27 +00:00 
			
		
		
		
	Merge branch 'master' into dev
This commit is contained in:
		
						commit
						8f48d1a811
					
				
							
								
								
									
										11
									
								
								src/power.sh
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/power.sh
									
									
									
									
									
								
							@ -74,6 +74,7 @@ ready() {
 | 
				
			|||||||
finish() {
 | 
					finish() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  local pid
 | 
					  local pid
 | 
				
			||||||
 | 
					  local cnt=0
 | 
				
			||||||
  local reason=$1
 | 
					  local reason=$1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  touch "$QEMU_END"
 | 
					  touch "$QEMU_END"
 | 
				
			||||||
@ -85,10 +86,20 @@ finish() {
 | 
				
			|||||||
    { kill -15 "$pid" || true; } 2>/dev/null
 | 
					    { kill -15 "$pid" || true; } 2>/dev/null
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    while isAlive "$pid"; do
 | 
					    while isAlive "$pid"; do
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      sleep 1
 | 
					      sleep 1
 | 
				
			||||||
 | 
					      cnt=$((cnt+1))
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
      # Workaround for zombie pid
 | 
					      # Workaround for zombie pid
 | 
				
			||||||
      [ ! -s "$QEMU_PID" ] && break
 | 
					      [ ! -s "$QEMU_PID" ] && break
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					      if [ "$cnt" == "5" ]; then
 | 
				
			||||||
 | 
					        error "QEMU did not terminate itself, forcefully killing process..."
 | 
				
			||||||
 | 
					        { kill -9 "$pid" || true; } 2>/dev/null
 | 
				
			||||||
 | 
					      fi
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
    done
 | 
					    done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$BOOT" ]; then
 | 
					  if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$BOOT" ]; then
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user