Commit 9f632863 authored by Austin Clements's avatar Austin Clements

Fix declared and not set errors in old ptrace package (still

used by ogle)

R=rsc
APPROVED=rsc
DELTA=4  (0 added, 1 deleted, 3 changed)
OCL=34852
CL=34964
parent da4a2299
...@@ -419,7 +419,6 @@ func (p *process) uninstallBreakpoints() os.Error { ...@@ -419,7 +419,6 @@ func (p *process) uninstallBreakpoints() os.Error {
// event. // event.
func (t *thread) wait() { func (t *thread) wait() {
for { for {
var err os.Error;
var ev debugEvent; var ev debugEvent;
ev.t = t; ev.t = t;
t.logTrace("beginning wait"); t.logTrace("beginning wait");
...@@ -762,7 +761,7 @@ func (p *process) do(f func () os.Error) os.Error { ...@@ -762,7 +761,7 @@ func (p *process) do(f func () os.Error) os.Error {
// stopMonitor stops the monitor with the given error. If the monitor // stopMonitor stops the monitor with the given error. If the monitor
// is already stopped, does nothing. // is already stopped, does nothing.
func (p *process) stopMonitor(err os.Error) { func (p *process) stopMonitor(err os.Error) {
doNotBlock := p.stopReq <- err; _ = p.stopReq <- err;
// TODO(austin) Wait until monitor has exited? // TODO(austin) Wait until monitor has exited?
} }
...@@ -1213,7 +1212,7 @@ func (p *process) attachAllThreads() os.Error { ...@@ -1213,7 +1212,7 @@ func (p *process) attachAllThreads() os.Error {
continue; continue;
} }
t, err := p.attachThread(tid); _, err = p.attachThread(tid);
if err != nil { if err != nil {
// There could have been a race, or // There could have been a race, or
// this process could be a zobmie. // this process could be a zobmie.
...@@ -1308,7 +1307,7 @@ func ForkExec(argv0 string, argv []string, envv []string, dir string, fd []*os.F ...@@ -1308,7 +1307,7 @@ func ForkExec(argv0 string, argv []string, envv []string, dir string, fd []*os.F
p.pid = pid; p.pid = pid;
// The process will raise SIGTRAP when it reaches execve. // The process will raise SIGTRAP when it reaches execve.
t, err := p.newThread(pid, syscall.SIGTRAP, false); _, err := p.newThread(pid, syscall.SIGTRAP, false);
return err; return err;
}); });
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment