summaryrefslogtreecommitdiff
path: root/src/pkg/debug/proc
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-08-03 16:54:30 +0200
committerOndřej Surý <ondrej@sury.org>2011-08-03 16:54:30 +0200
commit28592ee1ea1f5cdffcf85472f9de0285d928cf12 (patch)
tree32944e18b23f7fe4a0818a694aa2a6dfb1835463 /src/pkg/debug/proc
parente836bee4716dc0d4d913537ad3ad1925a7ac32d0 (diff)
downloadgolang-upstream/59.tar.gz
Imported Upstream version 59upstream/59
Diffstat (limited to 'src/pkg/debug/proc')
-rw-r--r--src/pkg/debug/proc/proc_linux.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pkg/debug/proc/proc_linux.go b/src/pkg/debug/proc/proc_linux.go
index 153c3e99b..7ec797114 100644
--- a/src/pkg/debug/proc/proc_linux.go
+++ b/src/pkg/debug/proc/proc_linux.go
@@ -1229,7 +1229,7 @@ func (p *process) attachAllThreads() os.Error {
return err
}
- statParts := strings.Split(string(statFile), " ", 4)
+ statParts := strings.SplitN(string(statFile), " ", 4)
if len(statParts) > 2 && statParts[2] == "Z" {
// tid is a zombie
p.logTrace("thread %d is a zombie", tid)
@@ -1284,9 +1284,11 @@ func Attach(pid int) (Process, os.Error) {
// details.
func StartProcess(argv0 string, argv []string, attr *os.ProcAttr) (Process, os.Error) {
sysattr := &syscall.ProcAttr{
- Dir: attr.Dir,
- Env: attr.Env,
- Ptrace: true,
+ Dir: attr.Dir,
+ Env: attr.Env,
+ Sys: &syscall.SysProcAttr{
+ Ptrace: true,
+ },
}
p := newProcess(-1)