You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
Hello All,
Does os.SetEnv persist through computer restarts. If not is there anyway to do it through Go. The only platform under consideration is Linux, but if its possible to do it for all (Windows, Linux, Mac) that would be great.
Dave Cheney
unread,
Jul 10, 2013, 2:21:20 AM7/10/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to johnalan...@polylabs.ca, golang-nuts
os.SetEnv _only_ changes the environment definition inside your
process. These changes may be visibile to child processes, but only if
you accept the zero value for os/exec.Cmd.Args,
http://golang.org/pkg/os/exec/#Cmd
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Jesse McNelis
unread,
Jul 10, 2013, 2:22:31 AM7/10/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
Does os.SetEnv persist through computer restarts. If not is there anyway to do it through Go. The only platform under consideration is Linux, but if its possible to do it for all (Windows, Linux, Mac) that would be great.
Environment variables are a per process thing. So something needs to store the state to disk and load it in to it's environment and pass that environment on to it's child processes.
This is generally done by the shell, I don't think there is a cross shell way to tell a shell to persist an environment variable to it's configuration.
Archos
unread,
Jul 10, 2013, 3:47:10 AM7/10/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com, johnalan...@polylabs.ca
This is something that I need and it is just the next thing I had to develop. In Unix systems is far easier but I'll have to do a lot of re-search to get it in Windows.
Soifyou'realittlepatient...
Archos
unread,
Jul 29, 2013, 8:40:41 AM7/29/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com, johnalan...@polylabs.ca
It depends on shconf [https://github.com/kless/shutil/tree/master/shconf] to get all keys and values without to be commented. When I add, the functions "unset", they will remove the line where it's the key, rather than to comment the line.