summaryrefslogtreecommitdiff
path: root/src/pkg/syscall/zsyscall_linux_386.go
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2010-04-19 13:12:11 +1000
committerAndrew Gerrand <adg@golang.org>2010-04-19 13:12:11 +1000
commit65b6c6db04e27d11ecf9bd7bd4269bdb8e73f5e1 (patch)
tree4d7c73dbe4dd2389df7eb4c558ae104c463612e5 /src/pkg/syscall/zsyscall_linux_386.go
parent585e169ff2ad541242b78b4a5756b424cf6927e4 (diff)
downloadgolang-65b6c6db04e27d11ecf9bd7bd4269bdb8e73f5e1.tar.gz
syscall: match linux Setsid function signature to darwin
SETSID does return an errno - any reason why it has been done this way in zsyscall_linux_* ? Otherwise it should be the same as darwin. From SETSID(2) on my Linux box: ERRORS On error, -1 is returned, and errno is set. Fixes issue 730 R=rsc CC=golang-dev http://codereview.appspot.com/878047
Diffstat (limited to 'src/pkg/syscall/zsyscall_linux_386.go')
-rw-r--r--src/pkg/syscall/zsyscall_linux_386.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/syscall/zsyscall_linux_386.go b/src/pkg/syscall/zsyscall_linux_386.go
index 519b52f0e..951ed1f14 100644
--- a/src/pkg/syscall/zsyscall_linux_386.go
+++ b/src/pkg/syscall/zsyscall_linux_386.go
@@ -434,9 +434,10 @@ func Setrlimit(resource int, rlim *Rlimit) (errno int) {
return
}
-func Setsid() (pid int) {
- r0, _, _ := Syscall(SYS_SETSID, 0, 0, 0)
+func Setsid() (pid int, errno int) {
+ r0, _, e1 := Syscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
+ errno = int(e1)
return
}