Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6)

Issue 5617048: code review 5617048: pkg/runtime: Plan 9 signal handling in Go (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by akumar
Modified:
12 years, 10 months ago
Reviewers:
CC:
golang-dev, ality, rminnich, rsc, John Floren, aam
Visibility:
Public.

Description

pkg/runtime: Plan 9 signal handling in Go This adds proper note handling for Plan 9, and fixes the issue of properly killing go procs. Without this change, the first go proc that dies (using runtime·exit()) would kill all the running go procs. Proper signal handling is needed.

Patch Set 1 #

Patch Set 2 : diff -r 855fc8e73259 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r da15310087d6 https://go.googlecode.com/hg/ #

Total comments: 8

Patch Set 4 : diff -r 8dd8f41d4a7e https://go.googlecode.com/hg/ #

Total comments: 11

Patch Set 5 : diff -r 762426ee0cca https://code.google.com/p/go #

Patch Set 6 : diff -r 762426ee0cca https://code.google.com/p/go #

Patch Set 7 : diff -r 762426ee0cca https://code.google.com/p/go #

Total comments: 12

Patch Set 8 : diff -r a94cc825cbb3 https://code.google.com/p/go #

Patch Set 9 : diff -r 7ee60b35f644 https://code.google.com/p/go #

Patch Set 10 : diff -r 7ee60b35f644 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+149 lines, -20 lines) Patch
M src/pkg/runtime/os_plan9.h View 1 2 3 4 2 chunks +10 lines, -0 lines 0 comments Download
M src/pkg/runtime/sys_plan9_386.s View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M src/pkg/runtime/thread_plan9.c View 1 2 3 4 5 6 7 8 3 chunks +129 lines, -20 lines 0 comments Download

Messages

Total messages: 17
akumar
Hello golang-dev@googlegroups.com (cc: ality@pbrane.org, john@jfloren.net, mirtchovski@gmail.com, nix-dev@googlegroups.com, rminnich@gmail.com, rsc@golang.org), I'd like you to review this ...
13 years, 1 month ago (2012-02-05 06:45:20 UTC) #1
rsc
I'd like to postpone all the Plan 9 work until after Go 1. That said, ...
13 years, 1 month ago (2012-02-06 17:47:27 UTC) #2
akumar
Hi Russ, Just to point out: creating a list of pids and sending them a ...
13 years, 1 month ago (2012-02-06 18:36:10 UTC) #3
rsc
On Mon, Feb 6, 2012 at 13:36, Akshat Kumar <seed@mail.nanosouffle.net> wrote: > Just to point ...
13 years, 1 month ago (2012-02-06 18:38:26 UTC) #4
ality
https://codereview.appspot.com/5617048/diff/4001/src/pkg/runtime/os_plan9.h File src/pkg/runtime/os_plan9.h (right): https://codereview.appspot.com/5617048/diff/4001/src/pkg/runtime/os_plan9.h#newcode16 src/pkg/runtime/os_plan9.h:16: int32 runtime·plan9_notify(void (*fn)(void*, byte*)); There's no need for the ...
13 years, 1 month ago (2012-02-08 08:20:38 UTC) #5
akumar
PTAL I've updated how the note handling works, how we attain PIDs, and added an ...
13 years, 1 month ago (2012-02-14 18:44:18 UTC) #6
ality
https://codereview.appspot.com/5617048/diff/12001/src/pkg/runtime/os_plan9.h File src/pkg/runtime/os_plan9.h (right): https://codereview.appspot.com/5617048/diff/12001/src/pkg/runtime/os_plan9.h#newcode20 src/pkg/runtime/os_plan9.h:20: int32 runtime·strncmp(byte*, byte*, int32); Put this declaration in runtime.c. ...
13 years, 1 month ago (2012-02-16 01:17:18 UTC) #7
rminnich
On 2012/02/16 01:17:18, ality wrote: > > https://codereview.appspot.com/5617048/diff/12001/src/pkg/runtime/thread_plan9.c#newcode44 > src/pkg/runtime/thread_plan9.c:44: getpid(void) > This function is ...
13 years, 1 month ago (2012-02-16 06:24:49 UTC) #8
akumar
PTAL. https://codereview.appspot.com/5617048/diff/12001/src/pkg/runtime/os_plan9.h File src/pkg/runtime/os_plan9.h (right): https://codereview.appspot.com/5617048/diff/12001/src/pkg/runtime/os_plan9.h#newcode20 src/pkg/runtime/os_plan9.h:20: int32 runtime·strncmp(byte*, byte*, int32); On 2012/02/16 01:17:19, ality ...
12 years, 11 months ago (2012-04-14 00:13:31 UTC) #9
rminnich
This looks great. And, yes, I am glad you do not use tos->pid. It's a ...
12 years, 11 months ago (2012-04-14 00:23:58 UTC) #10
akumar
ping! Other reviewers? There are quite a few CLs for Plan 9 now that are ...
12 years, 11 months ago (2012-04-16 23:07:19 UTC) #11
ality
Sorry for the slow response. https://codereview.appspot.com/5617048/diff/29001/src/pkg/runtime/thread_plan9.c File src/pkg/runtime/thread_plan9.c (right): https://codereview.appspot.com/5617048/diff/29001/src/pkg/runtime/thread_plan9.c#newcode10 src/pkg/runtime/thread_plan9.c:10: int8 *runtime·exitstatus; I think ...
12 years, 11 months ago (2012-04-17 00:15:52 UTC) #12
akumar
PTAL. https://codereview.appspot.com/5617048/diff/29001/src/pkg/runtime/thread_plan9.c File src/pkg/runtime/thread_plan9.c (right): https://codereview.appspot.com/5617048/diff/29001/src/pkg/runtime/thread_plan9.c#newcode10 src/pkg/runtime/thread_plan9.c:10: int8 *runtime·exitstatus; This needs to be done, since ...
12 years, 11 months ago (2012-04-17 06:12:16 UTC) #13
ality
LGTM Does anyone else have comments? I'll submit this on Monday if there are no ...
12 years, 10 months ago (2012-04-28 05:49:27 UTC) #14
rsc
LGTM Let's drop strncmp. The one place you use it could just as well be ...
12 years, 10 months ago (2012-05-03 21:51:41 UTC) #15
akumar
PTAL. Done. The only reservation I had about using runtime·mcmp was that it doesn't check ...
12 years, 10 months ago (2012-05-04 01:22:08 UTC) #16
ality
12 years, 10 months ago (2012-05-04 10:48:43 UTC) #17
*** Submitted as http://code.google.com/p/go/source/detail?r=9233f811c522 ***

pkg/runtime: Plan 9 signal handling in Go

This adds proper note handling for Plan 9,
and fixes the issue of properly killing go procs.
Without this change, the first go proc that dies
(using runtime·exit()) would kill all the running
go procs. Proper signal handling is needed.

R=golang-dev, ality, rminnich, rsc
CC=golang-dev, john, mirtchovski
http://codereview.appspot.com/5617048

Committer: Anthony Martin <ality@pbrane.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b