-
Notifications
You must be signed in to change notification settings - Fork 999
os/StartProcess #4377
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
os/StartProcess #4377
Conversation
43fcf8f to
8cce6c2
Compare
aykevl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick initial (incomplete) review
fffffce to
0844543
Compare
ci fails with undefined EDIT: it looks like this is only happening on architectures that the Anyhow the smoke tests fail without any further information of what went wrong on linux, windows and mac. the smoke test cannot be removed, it is not clear though why it wasn't build in the first place |
4189be1 to
a67e057
Compare
e369ae7 to
bf011fe
Compare
bbf1159 to
ffa5a87
Compare
|
@deadprogram @dgryski @aykevl build and tests finally succeed, would appreciate another review. |
|
@aykevl @deadprogram @dgryski would someone mind reviewing? |
Signed-off-by: leongross <[email protected]>
remove old comments, replace explicit syscall numbers with named variants, undo tempfile seed generation, remove old // +build tags, improve StartProcess documentation, remove custom syscall number definitions. Signed-off-by: leongross <[email protected]>
aarch64 has no support for the fork ssycall. for now exclude it. Signed-off-by: leongross <[email protected]>
Signed-off-by: leongross <[email protected]>
Signed-off-by: leongross <[email protected]>
Signed-off-by: leongross <[email protected]>
Signed-off-by: leongross <[email protected]>
Signed-off-by: leongross <[email protected]>
Signed-off-by: leongross <[email protected]>
230e977 to
706477a
Compare
Signed-off-by: leongross <[email protected]>
aykevl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small things, otherwise this PR seems ready for merging.
| return 0, errors.New("exec: no argv") | ||
| } | ||
|
|
||
| if len(argv) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: with this check, the previous check is unnecessary. len(argv) of a nil slice is always 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was left behind and got merged 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it wasn't a blocker for me. It's not a bug, just code that could have been cleaner.
src/os/os.test
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file needs to be removed.
src/os/osexec_aarch64.go
Outdated
| @@ -0,0 +1,18 @@ | |||
| //go:build linux && !baremetal && !darwin && !tinygo.wasm && aarch64 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aarch64 is not a valid Go build tag.
I think this file can be removed entirely now, since these things are implemented in osexec.go?
src/os/osexec.go
Outdated
| //go:build linux && !baremetal && !tinygo.wasm | ||
|
|
||
| // arm64 does not have a fork syscall, so ignore it for now | ||
| // TODO: add support for arm64 with clone or use musl implementation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment needs to be updated or removed since it is outdated.
40487c7 to
94e8652
Compare
|
Thank you! I have merged the PR. |
|
Thanks for merging and the thorough review @aykevl! |
This is a rework of #4323 (based on that branch) to move the Execve and Fork wrappers to the
ospackage to circumvent the goroot overrides.