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

Issue 4306041: code review 4306041: syscall: StartProcess fixes for windows (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 12 months ago by brainman
Modified:
13 years, 11 months ago
Reviewers:
CC:
golang-dev, r
Visibility:
Public.

Description

syscall: StartProcess fixes for windows - StartProcess will work with relative (to attr.Dir, not current directory) executable filenames - StartProcess will only work if executable filename points to the real file, it will not search for executable in the $PATH list and others (see CreateProcess manual for details) - StartProcess argv strings can contain any characters

Patch Set 1 #

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

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

Total comments: 18

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

Total comments: 16

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

Total comments: 16

Patch Set 6 : diff -r 88e7824cdba3 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+309 lines, -140 lines) Patch
M src/pkg/exec/exec_test.go View 1 2 3 4 1 chunk +52 lines, -0 lines 0 comments Download
M src/pkg/os/os_test.go View 1 3 chunks +27 lines, -17 lines 0 comments Download
M src/pkg/syscall/exec_windows.go View 1 2 3 4 5 6 chunks +210 lines, -120 lines 0 comments Download
M src/pkg/syscall/syscall_windows.go View 1 2 chunks +2 lines, -1 line 0 comments Download
M src/pkg/syscall/zsyscall_windows_386.go View 1 4 chunks +18 lines, -2 lines 0 comments Download

Messages

Total messages: 7
brainman
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 12 months ago (2011-03-22 06:22:18 UTC) #1
r
http://codereview.appspot.com/4306041/diff/4001/src/pkg/exec/exec_test.go File src/pkg/exec/exec_test.go (right): http://codereview.appspot.com/4306041/diff/4001/src/pkg/exec/exec_test.go#newcode140 src/pkg/exec/exec_test.go:140: "2 \\^", use raw strings to avoid backslashes. http://codereview.appspot.com/4306041/diff/4001/src/pkg/exec/exec_test.go#newcode166 ...
13 years, 12 months ago (2011-03-22 17:12:25 UTC) #2
brainman
Thank you for review. PTAL. Alex http://codereview.appspot.com/4306041/diff/4001/src/pkg/exec/exec_test.go File src/pkg/exec/exec_test.go (right): http://codereview.appspot.com/4306041/diff/4001/src/pkg/exec/exec_test.go#newcode140 src/pkg/exec/exec_test.go:140: "2 \\^", On ...
13 years, 11 months ago (2011-03-23 00:20:08 UTC) #3
r
http://codereview.appspot.com/4306041/diff/9001/src/pkg/exec/exec_test.go File src/pkg/exec/exec_test.go (right): http://codereview.appspot.com/4306041/diff/9001/src/pkg/exec/exec_test.go#newcode147 src/pkg/exec/exec_test.go:147: "BEGIN{printf(\"%s|%s|%s\",ARGV[1],ARGV[2],ARGV[3])}", this is fine, but you could use a ...
13 years, 11 months ago (2011-03-23 00:28:50 UTC) #4
brainman
PTAL http://codereview.appspot.com/4306041/diff/9001/src/pkg/exec/exec_test.go File src/pkg/exec/exec_test.go (right): http://codereview.appspot.com/4306041/diff/9001/src/pkg/exec/exec_test.go#newcode147 src/pkg/exec/exec_test.go:147: "BEGIN{printf(\"%s|%s|%s\",ARGV[1],ARGV[2],ARGV[3])}", Changed to use raw string. http://codereview.appspot.com/4306041/diff/9001/src/pkg/syscall/exec_windows.go File ...
13 years, 11 months ago (2011-03-23 01:15:25 UTC) #5
r
LGTM these are all just commentary http://codereview.appspot.com/4306041/diff/14001/src/pkg/syscall/exec_windows.go File src/pkg/syscall/exec_windows.go (right): http://codereview.appspot.com/4306041/diff/14001/src/pkg/syscall/exec_windows.go#newcode83 src/pkg/syscall/exec_windows.go:83: // makeCmdLine builds ...
13 years, 11 months ago (2011-03-23 21:07:32 UTC) #6
brainman
13 years, 11 months ago (2011-03-24 00:20:32 UTC) #7
*** Submitted as http://code.google.com/p/go/source/detail?r=d5a28a74b748 ***

syscall: StartProcess fixes for windows

- StartProcess will work with relative (to attr.Dir, not
  current directory) executable filenames
- StartProcess will only work if executable filename points
  to the real file, it will not search for executable in the
  $PATH list and others (see CreateProcess manual for details)
- StartProcess argv strings can contain any characters

R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/4306041

http://codereview.appspot.com/4306041/diff/14001/src/pkg/syscall/exec_windows.go
File src/pkg/syscall/exec_windows.go (right):

http://codereview.appspot.com/4306041/diff/14001/src/pkg/syscall/exec_windows...
src/pkg/syscall/exec_windows.go:83: // makeCmdLine builds command line out of
args, by escaping "special"
On 2011/03/23 21:07:32, r wrote:
> s/command/a command/
> s/,//

Done.

http://codereview.appspot.com/4306041/diff/14001/src/pkg/syscall/exec_windows...
src/pkg/syscall/exec_windows.go:84: // characters inside every argument and
concatenating them with spaces.
On 2011/03/23 21:07:32, r wrote:
> characters and joining the arguments with spaces.

Done.

http://codereview.appspot.com/4306041/diff/14001/src/pkg/syscall/exec_windows...
src/pkg/syscall/exec_windows.go:96: // createEnvBlock converts envv array of
environment strings into
On 2011/03/23 21:07:32, r wrote:
> s/envv /an/

Done.

http://codereview.appspot.com/4306041/diff/14001/src/pkg/syscall/exec_windows...
src/pkg/syscall/exec_windows.go:97: // representation required by CreateProcess:
sequence of null
On 2011/03/23 21:07:32, r wrote:
> s/rep/the rep/
> s/sequence/a &/
> s/null/NUL/  (null is a pointer, NUL is a character)

Done.

http://codereview.appspot.com/4306041/diff/14001/src/pkg/syscall/exec_windows...
src/pkg/syscall/exec_windows.go:98: // terminated strings followed by a null.
On 2011/03/23 21:07:32, r wrote:
> s/null/nil/

Done.

http://codereview.appspot.com/4306041/diff/14001/src/pkg/syscall/exec_windows...
src/pkg/syscall/exec_windows.go:99: // Last bytes are two unicode nulls, or four
null bytes.
On 2011/03/23 21:07:32, r wrote:
> s/null/NUL/g
> s/unicode/UCS-2/

Done.

http://codereview.appspot.com/4306041/diff/14001/src/pkg/syscall/exec_windows...
src/pkg/syscall/exec_windows.go:241: // Windows CreateProcess assumes the
opposite, it looks for
On 2011/03/23 21:07:32, r wrote:
> s/,/:/

Done.

http://codereview.appspot.com/4306041/diff/14001/src/pkg/syscall/exec_windows...
src/pkg/syscall/exec_windows.go:242: // argv0 relative to current directory,
and, only once the new
On 2011/03/23 21:07:32, r wrote:
> s/current/the current/

Done.
Sign in to reply to this message.

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