Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
brucealthompson opened this issue Nov 20, 2023 · 1 comment · May be fixed by #9
Open

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

brucealthompson opened this issue Nov 20, 2023 · 1 comment · May be fixed by #9

Comments

@brucealthompson
Copy link

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()

@nomisim nomisim linked a pull request Jul 3, 2024 that will close this issue
@nomisim
Copy link

nomisim commented Jul 3, 2024

PR #9 fixes this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants