OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgo/] [go/] [os/] [proc.go] - Blame information for rev 747

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 747 jeremybenn
// Copyright 2009 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
4
 
5
// Process etc.
6
 
7
package os
8
 
9
import "syscall"
10
 
11
// Args hold the command-line arguments, starting with the program name.
12
var Args []string
13
 
14
// Getuid returns the numeric user id of the caller.
15
func Getuid() int { return syscall.Getuid() }
16
 
17
// Geteuid returns the numeric effective user id of the caller.
18
func Geteuid() int { return syscall.Geteuid() }
19
 
20
// Getgid returns the numeric group id of the caller.
21
func Getgid() int { return syscall.Getgid() }
22
 
23
// Getegid returns the numeric effective group id of the caller.
24
func Getegid() int { return syscall.Getegid() }
25
 
26
// Getgroups returns a list of the numeric ids of groups that the caller belongs to.
27
func Getgroups() ([]int, error) {
28
        gids, e := syscall.Getgroups()
29
        return gids, NewSyscallError("getgroups", e)
30
}
31
 
32
// Exit causes the current program to exit with the given status code.
33
// Conventionally, code zero indicates success, non-zero an error.
34
func Exit(code int) { syscall.Exit(code) }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.