arp icon indicating copy to clipboard operation
arp copied to clipboard

Windows version pops up a cmd window when the arp command is run

Open brucealthompson opened this issue 1 year ago • 1 comments

I am using this package with the fyne UI toolkit. When the arp command is execured via exec() it pops up a command window that goes away after the arp command is run. To resolve this issue, the following command must be run before doing the exec(): syscall.SysProcAttr{HideWindow: true}

The following snippet should fix the issue: func Table() ArpTable { cmd := exec.Command("arp", "-a") cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true} var outb bytes.Buffer cmd.Stdout = &outb err := cmd.Run() data := outb.String()

brucealthompson avatar Nov 20 '23 14:11 brucealthompson