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

Issue 7128059: code review 7128059: syscall: fix fork-exec/wait inconsistencies for Plan 9 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by akumar
Modified:
11 years, 5 months ago
Reviewers:
CC:
rsc, rminnich, npe1, ality, golang-dev
Visibility:
Public.

Description

syscall: fix fork-exec/wait inconsistencies for Plan 9 Fixes the fork-exec/wait race condition for ForkExec as well, by making it use startProcess. This makes the comment for StartProcess consistent as well. Further, the passing of Waitmsg data in startProcess and WaitProcess is protected against possible forks from outside of ForkExec and StartProcess, which might cause interference with the Await call.

Patch Set 1 #

Patch Set 2 : diff -r 3c2980f1aa44 https://code.google.com/p/go #

Patch Set 3 : diff -r 3c2980f1aa44 https://code.google.com/p/go #

Total comments: 4

Patch Set 4 : diff -r 6287072632c4 https://code.google.com/p/go #

Total comments: 4

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -8 lines) Patch
M src/pkg/syscall/exec_plan9.go View 1 2 3 4 4 chunks +10 lines, -8 lines 0 comments Download

Messages

Total messages: 7
akumar
Hello rsc@golang.org, rminnich@gmail.com, npe@plan9.bell-labs.com (cc: ality@pbrane.org, golang-dev@googlegroups.com), I'd like you to review this change to ...
11 years, 5 months ago (2013-01-18 23:05:33 UTC) #1
ality
https://codereview.appspot.com/7128059/diff/3002/src/pkg/syscall/exec_plan9.go File src/pkg/syscall/exec_plan9.go (right): https://codereview.appspot.com/7128059/diff/3002/src/pkg/syscall/exec_plan9.go#newcode550 src/pkg/syscall/exec_plan9.go:550: if procs.waits[w.Pid] != nil { I don't understand why ...
11 years, 5 months ago (2013-01-20 09:56:53 UTC) #2
akumar
PTAL. If the feeling is still that the for-loop is unnecessary, I'll withdraw it in ...
11 years, 5 months ago (2013-01-22 03:47:19 UTC) #3
rsc
The loop is not really necessary anymore with ForkExec calling startProcess, but you can keep ...
11 years, 5 months ago (2013-01-23 03:25:22 UTC) #4
akumar
PTAL. Also updated the description. https://codereview.appspot.com/7128059/diff/9001/src/pkg/syscall/exec_plan9.go File src/pkg/syscall/exec_plan9.go (right): https://codereview.appspot.com/7128059/diff/9001/src/pkg/syscall/exec_plan9.go#newcode549 src/pkg/syscall/exec_plan9.go:549: for w.Pid != ret.pid ...
11 years, 5 months ago (2013-01-23 03:40:54 UTC) #5
rsc
LGTM
11 years, 5 months ago (2013-01-23 03:41:40 UTC) #6
rsc
11 years, 5 months ago (2013-01-23 03:42:49 UTC) #7
*** Submitted as https://code.google.com/p/go/source/detail?r=5b5399bc3335 ***

syscall: fix fork-exec/wait inconsistencies for Plan 9

Fixes the fork-exec/wait race condition for ForkExec
as well, by making it use startProcess. This makes the
comment for StartProcess consistent as well.

Further, the passing of Waitmsg data in startProcess
and WaitProcess is protected against possible forks
from outside of ForkExec and StartProcess, which might
cause interference with the Await call.

R=rsc, rminnich, npe, ality
CC=golang-dev
https://codereview.appspot.com/7128059

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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