diff options
Diffstat (limited to 'libgo/go/os/proc.go')
-rw-r--r-- | libgo/go/os/proc.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libgo/go/os/proc.go b/libgo/go/os/proc.go index 38c436ec54..774f09900e 100644 --- a/libgo/go/os/proc.go +++ b/libgo/go/os/proc.go @@ -6,11 +6,24 @@ package os -import "syscall" +import ( + "runtime" + "syscall" +) // Args hold the command-line arguments, starting with the program name. var Args []string +func init() { + if runtime.GOOS == "windows" { + // Initialized in exec_windows.go. + return + } + Args = runtime_args() +} + +func runtime_args() []string // in package runtime + // Getuid returns the numeric user id of the caller. func Getuid() int { return syscall.Getuid() } |