mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-11-03 19:15:58 +00:00 
			
		
		
		
	Many cli and arch files were using the 'older style' fairly full Apache license text. The project standard is the shorter SPDX style. Convert them over. Fixes: #225 Signed-off-by: Graham whaley <graham.whaley@intel.com>
		
			
				
	
	
		
			29 lines
		
	
	
		
			586 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			586 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// Copyright (c) 2017 Intel Corporation
 | 
						|
//
 | 
						|
// SPDX-License-Identifier: Apache-2.0
 | 
						|
//
 | 
						|
 | 
						|
package main
 | 
						|
 | 
						|
import "os"
 | 
						|
 | 
						|
var atexitFuncs []func()
 | 
						|
 | 
						|
var exitFunc = os.Exit
 | 
						|
 | 
						|
// atexit registers a function f that will be run when exit is called. The
 | 
						|
// handlers so registered will be called the in reverse order of their
 | 
						|
// registration.
 | 
						|
func atexit(f func()) {
 | 
						|
	atexitFuncs = append(atexitFuncs, f)
 | 
						|
}
 | 
						|
 | 
						|
// exit calls all atexit handlers before exiting the process with status.
 | 
						|
func exit(status int) {
 | 
						|
	for i := len(atexitFuncs) - 1; i >= 0; i-- {
 | 
						|
		f := atexitFuncs[i]
 | 
						|
		f()
 | 
						|
	}
 | 
						|
	exitFunc(status)
 | 
						|
}
 |