Merge lp:~niemeyer/gozk/fix-weekly into lp:gozk/zookeeper

Proposed by Gustavo Niemeyer
Status: Merged
Merged at revision: 27
Proposed branch: lp:~niemeyer/gozk/fix-weekly
Merge into: lp:gozk/zookeeper
Diff against target: 21 lines (+2/-2)
1 file modified
runserver.go (+2/-2)
To merge this branch: bzr merge lp:~niemeyer/gozk/fix-weekly
Reviewer Review Type Date Requested Status
The Go Language Gophers Pending
Review via email: mp+93198@code.launchpad.net

Description of the change

Fix support for weekly Go release.

https://codereview.appspot.com/5656063/

To post a comment you must log in.
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Please take a look.

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

Reviewers: mp+93198_code.launchpad.net,

Message:
Please take a look.

Description:

https://code.launchpad.net/~niemeyer/gozk/fix-weekly/+merge/93198

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/5656063/

Affected files:
   M runserver.go

Index: runserver.go
=== <email address hidden> >
<email address hidden>
=== modified file 'runserver.go'
--- runserver.go 2011-12-05 19:15:00 +0000
+++ runserver.go 2012-02-15 13:14:05 +0000
@@ -48,7 +48,7 @@

   // try to check if the process is actually running by sending
   // it signal 0.
- err = p.Signal(os.UnixSignal(0))
+ err = p.Signal(syscall.Signal(0))
   if err == nil {
    return p, nil
   }
@@ -136,7 +136,7 @@
   // anyway or that we can't wait for it for some other reason,
   // for example because it was originally started by some other process.
   _, err = p.Wait(0)
- if e, ok := err.(*os.SyscallError); ok && e.Errno == os.ECHILD || err ==
os.ECHILD {
+ if e, ok := err.(*os.SyscallError); ok && e.Err == os.ECHILD {
    // If we can't wait for the server, it's possible that it was running
    // but not as a child of this process, so the only thing we can do
    // is to poll until it exits. If the process has taken longer than

Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

*** Submitted:

Fix support for weekly Go release.

R=TheMue
CC=
https://codereview.appspot.com/5656063

https://codereview.appspot.com/5656063/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'runserver.go'
--- runserver.go 2011-12-05 19:15:00 +0000
+++ runserver.go 2012-02-15 13:33:18 +0000
@@ -48,7 +48,7 @@
4848
49 // try to check if the process is actually running by sending49 // try to check if the process is actually running by sending
50 // it signal 0.50 // it signal 0.
51 err = p.Signal(os.UnixSignal(0))51 err = p.Signal(syscall.Signal(0))
52 if err == nil {52 if err == nil {
53 return p, nil53 return p, nil
54 }54 }
@@ -136,7 +136,7 @@
136 // anyway or that we can't wait for it for some other reason,136 // anyway or that we can't wait for it for some other reason,
137 // for example because it was originally started by some other process.137 // for example because it was originally started by some other process.
138 _, err = p.Wait(0)138 _, err = p.Wait(0)
139 if e, ok := err.(*os.SyscallError); ok && e.Errno == os.ECHILD || err == os.ECHILD {139 if e, ok := err.(*os.SyscallError); ok && e.Err == os.ECHILD {
140 // If we can't wait for the server, it's possible that it was running140 // If we can't wait for the server, it's possible that it was running
141 // but not as a child of this process, so the only thing we can do141 // but not as a child of this process, so the only thing we can do
142 // is to poll until it exits. If the process has taken longer than142 // is to poll until it exits. If the process has taken longer than

Subscribers

People subscribed via source and target branches