You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Davincible that's not working on MacOS for obvious reasons. You can try to build for MacOS using the GOOS=darwin and GOARCH=amd64 and still get the error.
I believe using build tags like in my PR is the idiomatic way to support different platforms. As Go is a compiled language you cannot reference platform specific code (i.e. *syscall.SysProcAttr) and ignore it at runtime. You have to use build tags. It's the only way.
Even if that code would somehow compile(it's impossible) you still try to create a frame buffer (newFrameBuffer) that will fail on both MacOS and Windows because none of them support Xvfb.
env GOOS=darwin GOARCH=amd64 go build
./chrome.go:158:22: cmd.SysProcAttr.Pdeathsig undefined (type *syscall.SysProcAttr has no field or method Pdeathsig)
./display.go:83:20: xvfb.SysProcAttr.Pdeathsig undefined (type *syscall.SysProcAttr has no field or method Pdeathsig)
Unless specify a build tag, Windows or MacOS will read that code unconditionally, and inevitably, errors occur.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Windows/ Mac support
On linux with
pdeathsigit will automatically kill the child processes, that is currently not implemented on mac/linux