mirror of
				https://github.com/containers/podman.git
				synced 2025-11-01 02:42:11 +08:00 
			
		
		
		
	vendor latest containers/psgo
Signed-off-by: Valentin Rothberg <vrothberg@suse.com> Closes: #1162 Approved by: rhatdan
This commit is contained in:
		 Valentin Rothberg
					Valentin Rothberg
				
			
				
					committed by
					
						 Atomic Bot
						Atomic Bot
					
				
			
			
				
	
			
			
			 Atomic Bot
						Atomic Bot
					
				
			
						parent
						
							d9ae17400d
						
					
				
				
					commit
					159f7f179b
				
			
							
								
								
									
										15
									
								
								vendor/github.com/containers/psgo/internal/proc/ns.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								vendor/github.com/containers/psgo/internal/proc/ns.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| package proc | ||||
|  | ||||
| import ( | ||||
| 	"fmt" | ||||
| 	"os" | ||||
| ) | ||||
|  | ||||
| // ParsePIDNamespace returns the content of /proc/$pid/ns/pid. | ||||
| func ParsePIDNamespace(pid string) (string, error) { | ||||
| 	pidNS, err := os.Readlink(fmt.Sprintf("/proc/%s/ns/pid", pid)) | ||||
| 	if err != nil { | ||||
| 		return "", err | ||||
| 	} | ||||
| 	return pidNS, nil | ||||
| } | ||||
		Reference in New Issue
	
	Block a user