-
-
Notifications
You must be signed in to change notification settings - Fork 356
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
Interp: Set GID #514
Labels
Comments
Sorry, I don't get what you're trying to do. |
Closing for now. |
Hello there, I guess I understand the issue. Analog to bash, only This issue can be solved with the following patch: diff --git a/interp/api.go b/interp/api.go
index 6ac3dc34..b7526c56 100644
--- a/interp/api.go
+++ b/interp/api.go
@@ -444,6 +444,13 @@ func (r *Runner) Reset() {
Str: strconv.Itoa(os.Getuid()),
})
}
+ if !r.writeEnv.Get("GID").IsSet() {
+ r.setVar("GID", nil, expand.Variable{
+ Kind: expand.String,
+ ReadOnly: true,
+ Str: strconv.Itoa(os.Getgid()),
+ })
+ }
r.setVarString("PWD", r.Dir)
r.setVarString("IFS", " \t\n")
r.setVarString("OPTIND", "1") |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I know that you can get the PID from the terminal but there is a way to make the process that is going to work with an specificy GID (Group ID)?
Cheers
The text was updated successfully, but these errors were encountered: