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

Issue 4532075: code review 4532075: syscall: Controlling TTY support in StartProcess (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 10 months ago by krockot
Modified:
13 years, 8 months ago
Reviewers:
CC:
iant, bradfitz, r, rsc, borman, golang-dev
Visibility:
Public.

Description

syscall: Controlling TTY support in StartProcess These changes add a Ctty int field to the Unix syscall.ProcAttr which, if set >= 0 in conjuction with Setsid=true, will be used by forkAndExecInChild as the file descriptor for the new child's controlling terminal. Necessary changes have been made to mkerrors.sh to generate defs for TIOC*, though changes to its output files are not included here. The changes made should support Linux, FreeBSD and Darwin, at least.

Patch Set 1 #

Patch Set 2 : diff -r 0f59e8fbd2a1 https://go.googlecode.com/hg #

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

Total comments: 1

Patch Set 4 : diff -r 7159e585d7fd https://go.googlecode.com/hg #

Patch Set 5 : diff -r 7159e585d7fd https://go.googlecode.com/hg #

Total comments: 1

Patch Set 6 : diff -r 7159e585d7fd https://go.googlecode.com/hg #

Patch Set 7 : diff -r 7159e585d7fd https://go.googlecode.com/hg #

Total comments: 1

Patch Set 8 : diff -r 6faaa637819d https://go.googlecode.com/hg #

Patch Set 9 : diff -r 4d789ab9a41d https://go.googlecode.com/hg #

Total comments: 1

Patch Set 10 : diff -r 4d789ab9a41d https://go.googlecode.com/hg #

Patch Set 11 : diff -r 31442abba988 https://go.googlecode.com/hg #

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

Messages

Total messages: 28
krockot
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg
13 years, 10 months ago (2011-05-21 02:14:01 UTC) #1
iant
http://codereview.appspot.com/4532075/diff/4001/src/pkg/syscall/exec_unix.go File src/pkg/syscall/exec_unix.go (right): http://codereview.appspot.com/4532075/diff/4001/src/pkg/syscall/exec_unix.go#newcode147 src/pkg/syscall/exec_unix.go:147: if attr.Ctty >= 0 { In general we want ...
13 years, 10 months ago (2011-05-21 05:54:08 UTC) #2
krockot
> In general we want the 0 value to indicate that nothing special should happen. ...
13 years, 10 months ago (2011-05-21 06:09:18 UTC) #3
krockot
Hello golang-dev@googlegroups.com, iant@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 10 months ago (2011-05-21 07:38:52 UTC) #4
bradfitz
Pointer to int like optional fields in protobuf? (phone), brad On May 20, 2011 10:54 ...
13 years, 10 months ago (2011-05-21 14:27:30 UTC) #5
krockot
Hello golang-dev@googlegroups.com, iant@golang.org, bradfitz@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 10 months ago (2011-05-22 01:40:24 UTC) #6
r
http://codereview.appspot.com/4532075/diff/10001/src/pkg/syscall/exec_unix.go File src/pkg/syscall/exec_unix.go (right): http://codereview.appspot.com/4532075/diff/10001/src/pkg/syscall/exec_unix.go#newcode277 src/pkg/syscall/exec_unix.go:277: Ctty *int // Controlling TTY fd if Setsid. why ...
13 years, 10 months ago (2011-05-22 01:44:45 UTC) #7
r2
On 22/05/2011, at 11:51 AM, Ken Rockot wrote: > fd 0 is a valid value ...
13 years, 10 months ago (2011-05-22 02:37:29 UTC) #8
bradfitzgoog
Ian wanted a no-op zero value. I threw out the pointer thing as a possible ...
13 years, 10 months ago (2011-05-22 02:50:33 UTC) #9
r2
On 22/05/2011, at 12:50 PM, Brad Fitzpatrick wrote: > Ian wanted a no-op zero value. ...
13 years, 10 months ago (2011-05-22 03:54:32 UTC) #10
r2
On 23/05/2011, at 11:20 AM, Ken Rockot wrote: > How about this: > > type ...
13 years, 10 months ago (2011-05-23 13:17:58 UTC) #11
krockot
Hello golang-dev@googlegroups.com, iant@golang.org, bradfitz@golang.org, r@golang.org, r@google.com, bradfitz@google.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-05-23 21:33:24 UTC) #12
krockot
Hello golang-dev@googlegroups.com, iant@golang.org, bradfitz@golang.org, r@golang.org, r@google.com, bradfitz@google.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-05-23 21:33:38 UTC) #13
r
i think this is a good design. http://codereview.appspot.com/4532075/diff/15001/src/pkg/syscall/exec_unix.go File src/pkg/syscall/exec_unix.go (right): http://codereview.appspot.com/4532075/diff/15001/src/pkg/syscall/exec_unix.go#newcode270 src/pkg/syscall/exec_unix.go:270: type Credential ...
13 years, 9 months ago (2011-05-26 03:48:47 UTC) #14
krockot
Hello golang-dev@googlegroups.com, iant@golang.org, bradfitz@golang.org, r@golang.org, r@google.com, bradfitz@google.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-05-27 23:52:58 UTC) #15
rsc
+borman for his opinion Sorry this fell by the wayside. I just submitted some changes ...
13 years, 9 months ago (2011-06-14 15:42:18 UTC) #16
borman
TIOCSCTTY taking an argument is OS specific (it is used in Linux to allow "stealing" ...
13 years, 9 months ago (2011-06-14 19:16:55 UTC) #17
borman
I am not convinced that this should be a complete new structure. I see four ...
13 years, 9 months ago (2011-06-15 00:14:31 UTC) #18
krockot
Hello iant@golang.org, bradfitz@golang.org, r@golang.org, rsc@golang.org, borman@google.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-06-20 01:08:31 UTC) #19
borman
Other than perhaps changing Sctty to Setctty, this looks reasonable to me. http://codereview.appspot.com/4532075/diff/22001/src/pkg/syscall/exec_unix.go File src/pkg/syscall/exec_unix.go ...
13 years, 9 months ago (2011-06-20 01:21:53 UTC) #20
krockot
Hello iant@golang.org, bradfitz@golang.org, r@golang.org, rsc@golang.org, borman@google.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-06-20 01:54:44 UTC) #21
borman
LGTM
13 years, 9 months ago (2011-06-20 16:36:29 UTC) #22
rsc
It looks like you need to add some files to this change list? mkerrors.sh changed ...
13 years, 9 months ago (2011-06-20 19:34:35 UTC) #23
rsc
> I could make the relevant (minimal) changes by hand, but files will still be ...
13 years, 9 months ago (2011-06-20 22:30:01 UTC) #24
krockot
Hello iant@golang.org, bradfitz@golang.org, r@golang.org, rsc@golang.org, borman@google.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 9 months ago (2011-06-20 22:34:51 UTC) #25
rsc
LGTM
13 years, 9 months ago (2011-06-21 15:59:13 UTC) #26
rsc
It doesn't look like you've completed a CLA. Please complete a CLA as described at ...
13 years, 9 months ago (2011-06-21 16:00:55 UTC) #27
rsc
13 years, 8 months ago (2011-06-22 22:07:22 UTC) #28
*** Submitted as http://code.google.com/p/go/source/detail?r=d988ff98cb14 ***

syscall: add tty support to StartProcess

These changes add a Ctty int field to the Unix syscall.ProcAttr which,
if set >= 0 in conjuction with Setsid=true, will be used by
forkAndExecInChild as the file descriptor for the new child's
controlling terminal.

Necessary changes have been made to mkerrors.sh to generate defs for
TIOC*, though changes to its output files are not included here.
The changes made should support Linux, FreeBSD and Darwin, at least.

R=iant, bradfitz, r, rsc, borman
CC=golang-dev
http://codereview.appspot.com/4532075

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