// FromPid creates a new BinFile from a running process.
FromPid creates a new BinFile from a running process.
// FromPid creates a new BinFile from a running process .
func FromPid(pid int) (*BinFile, error) {
	binpath, err := os.Readlink(fmt.Sprintf("/proc/%d/exe", pid))
	if err != nil {
		return nil, err
	}
	f, err := os.Open(binpath)
	if err != nil {
		return nil, err
	}
	return Read(f, filepath.Base(binpath))
}
func FromPid ( pid int ) ( * BinFile , error ) { binpath , err := os . Readlink ( fmt . Sprintf ( " " , pid ) ) if err != nil { return nil , err } f , err := os . Open ( binpath ) if err != nil { return nil , err } return Read ( f , filepath . Base ( binpath ) ) }
FromPid creates a new BinFile from a running process.
FromPid creates a new BinFile from a running process .