package: Always clear the SIGINT handler.
* guix/scripts/package.scm (call-with-sigint-handler): Wrap THUNK in `dynamic-wind' so that the SIGINT handler is always cleared.
This commit is contained in:
		
							parent
							
								
									91fe0e20c7
								
							
						
					
					
						commit
						90a1e4b303
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -295,7 +295,10 @@ return its return value."
 | 
			
		|||
                        (lambda (signum)
 | 
			
		||||
                          (sigaction SIGINT SIG_DFL)
 | 
			
		||||
                          (abort-to-prompt %sigint-prompt signum)))
 | 
			
		||||
                      (thunk))
 | 
			
		||||
                      (dynamic-wind
 | 
			
		||||
                        (const #t)
 | 
			
		||||
                        thunk
 | 
			
		||||
                        (cut sigaction SIGINT SIG_DFL)))
 | 
			
		||||
                    (lambda (k signum)
 | 
			
		||||
                      (handler signum))))
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue