Skip to content

os/exec: add boolean to tell whether exec is implemented on this platform #11077

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

Closed
robpike opened this issue Jun 4, 2015 · 4 comments
Closed
Milestone

Comments

@robpike
Copy link
Contributor

robpike commented Jun 4, 2015

too many tests must now ask the "does this os have exec?" question it would be nice to put it in one place, and os/exec is the obvious one.

@robpike robpike added this to the Go1.5 milestone Jun 4, 2015
@bradfitz
Copy link
Contributor

bradfitz commented Jun 4, 2015

Seems like a low-level wart in a high-level package.

It's the os or syscall package that is actually unable to do this.

I know how you feel about adding anything to syscall, but syscall already has:

const ImplementsGetwd = true

... so it would be consistent to put it there.

@crawshaw
Copy link
Member

crawshaw commented Jun 5, 2015

Note that Android can exec (though the platform generally discourages it). The problem there is that all Go binaries must be linked with a linker not available on the Android platform. You have to cross compile. The result is there is no useful go command on Android, which many tests use.

iOS cannot exec at all, the sandboxd disallows it.

So the set of tests excluded on Android is a subset of the tests excluded on iOS.

@robpike
Copy link
Contributor Author

robpike commented Jun 5, 2015

syscall is allowed to have changes that support the core, and this is one example. but other trains are in motion.

@josharian
Copy link
Contributor

Fixed by CL 10753, I think.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants