procspy icon indicating copy to clipboard operation
procspy copied to clipboard

compile fail on mac

Open joeblew99 opened this issue 6 years ago • 4 comments

panic: unexpected lsof field: f in "7"

joeblew99 avatar Jul 21 '19 12:07 joeblew99

On Sun, Jul 21, 2019 at 05:21:26AM -0700, jow blew wrote:

panic: unexpected lsof field: f in "7"

Hi,

I don't have access to a mac, so I can't fix this without help.

alicebob avatar Jul 22 '19 06:07 alicebob

Getting the same error

dvasilen avatar Nov 12 '19 13:11 dvasilen

lsof.go

add these code in line70

	case 'f':
		/*
		  lsof:	ID    field description
			 a    access: r = read; w = write; u = read/write
			 c    command name
			 C    file struct share count
			 d    device character code
			 D    major/minor device number as 0x<hex>
			 f    file descriptor (always selected)

			mac platform ,lsof version revision: 4.89, file descriptor (always selected)
		 */
		continue

gaoguofu avatar Nov 21 '19 09:11 gaoguofu

fixed code , see https://github.com/gaoguofu/procspy/pull/1/files/3965192f94c083f4fd1a42dd58ef93d486803938

gaoguofu avatar Nov 21 '19 09:11 gaoguofu