LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // Process etc. | 5 // Process etc. |
6 | 6 |
7 package os | 7 package os |
8 | 8 |
9 import "syscall" | 9 import "syscall" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 func Getegid() int { return syscall.Getegid() } | 24 func Getegid() int { return syscall.Getegid() } |
25 | 25 |
26 // Getgroups returns a list of the numeric ids of groups that the caller belongs
to. | 26 // Getgroups returns a list of the numeric ids of groups that the caller belongs
to. |
27 func Getgroups() ([]int, error) { | 27 func Getgroups() ([]int, error) { |
28 gids, e := syscall.Getgroups() | 28 gids, e := syscall.Getgroups() |
29 return gids, NewSyscallError("getgroups", e) | 29 return gids, NewSyscallError("getgroups", e) |
30 } | 30 } |
31 | 31 |
32 // Exit causes the current program to exit with the given status code. | 32 // Exit causes the current program to exit with the given status code. |
33 // Conventionally, code zero indicates success, non-zero an error. | 33 // Conventionally, code zero indicates success, non-zero an error. |
| 34 // |
| 35 // Note that if Exit is called after issuing defer statements, those defer state
ments will |
| 36 // never be executed as Exit causes the program to terminate before the end of t
he current |
| 37 // function is reached. |
34 func Exit(code int) { syscall.Exit(code) } | 38 func Exit(code int) { syscall.Exit(code) } |
LEFT | RIGHT |