mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Fix TestPidOf {procfs} - Take #2
We should not bailout when we get an error. We should continue processing other files/directories. We were returning the err passed in which was causing the processing to stop. Fixes #30377
This commit is contained in:
		@@ -66,7 +66,8 @@ func PidOf(name string) []int {
 | 
			
		||||
	pids := []int{}
 | 
			
		||||
	filepath.Walk("/proc", func(path string, info os.FileInfo, err error) error {
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return err
 | 
			
		||||
			// We should continue processing other directories/files
 | 
			
		||||
			return nil
 | 
			
		||||
		}
 | 
			
		||||
		base := filepath.Base(path)
 | 
			
		||||
		// Traverse only the directories we are interested in
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user