forked from ungleich-public/cdist
		
	do not need to use terminate()/SIGTERM
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								ede8fd7518
							
						
					
				
			
			
				commit
				
					
						dbdf036787
					
				
			
		
					 1 changed files with 7 additions and 3 deletions
				
			
		
							
								
								
									
										10
									
								
								bin/cdist
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								bin/cdist
									
										
									
									
									
								
							| 
						 | 
					@ -150,9 +150,12 @@ def configinstall(args, mode):
 | 
				
			||||||
    except KeyboardInterrupt:
 | 
					    except KeyboardInterrupt:
 | 
				
			||||||
        if args.parallel:
 | 
					        if args.parallel:
 | 
				
			||||||
            for p in process.keys():
 | 
					            for p in process.keys():
 | 
				
			||||||
                pid = process[p].pid.__str__()
 | 
					                # NOT needed: KeyBoardInterrupet (aka SIGINT)
 | 
				
			||||||
                log.warn("Terminating deploy " + p + " (" + pid + ")")
 | 
					                # is forwarded to processes spawned by multiprocess!
 | 
				
			||||||
                process[p].terminate()
 | 
					                # pid = process[p].pid.__str__()
 | 
				
			||||||
 | 
					                #log.warn("Terminating deploy " + p + " (" + pid + ")")
 | 
				
			||||||
 | 
					                # process[p].terminate()
 | 
				
			||||||
 | 
					                pass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        sys.exit(0)
 | 
					        sys.exit(0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -182,6 +185,7 @@ def configinstall_onehost(host, args, mode, parallel):
 | 
				
			||||||
        if not parallel:
 | 
					        if not parallel:
 | 
				
			||||||
            raise
 | 
					            raise
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
 | 
					            # Catch here, above does not need to know about our errors
 | 
				
			||||||
            return False
 | 
					            return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return True
 | 
					    return True
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue