Skip to content

Don't send stderr when term=true on windows - #2560

Closed
crosbymichael wants to merge 1 commit into
containerd:masterfrom
crosbymichael:stderr-win
Closed

crosbymichael wants to merge 1 commit into
containerd:masterfrom
crosbymichael:stderr-win

Conversation

@crosbymichael

Copy link
Copy Markdown
Member

Signed-off-by: Michael Crosby [email protected]

@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #2560 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2560   +/-   ##
=======================================
  Coverage   44.59%   44.59%           
=======================================
  Files          95       95           
  Lines       10007    10007           
=======================================
  Hits         4463     4463           
  Misses       4822     4822           
  Partials      722      722
Flag Coverage Δ
#linux 48.4% <ø> (ø) ⬆️
#windows 41.54% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f42445...b8035f0. Read the comment docs.

@jterry75

Copy link
Copy Markdown
Contributor

Should we also:
in io.go:

// WithStreams sets the stream options to the specified Reader and Writers
func WithStreams(stdin io.Reader, stdout, stderr io.Writer) Opt {
	return func(opt *Streams) {
		opt.Stdin = stdin
		opt.Stdout = stdout
		if !opt.Terminal {
			opt.Stderr = stderr
		}
	}
}

and in: tasks_unix.go and tasks_windows.go reorder:

ioCreator = cio.NewCreator(append([]cio.Opt{cio.WithStdio, cio.WithTerminal}, ioOpts...)...)

to

ioCreator = cio.NewCreator(append([]cio.Opt{cio.WithTerminal, cio.WithStdio}, ioOpts...)...)

That way the opts and the fifo don't consider stderr if Terminal

@jterry75

Copy link
Copy Markdown
Contributor

But this code does work so LGTM

@crosbymichael

Copy link
Copy Markdown
Member Author

I can fix that case as well

@estesp estesp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crosbymichael
crosbymichael deleted the stderr-win branch August 22, 2018 15:01
@crosbymichael

Copy link
Copy Markdown
Member Author

Fixing the issues in containerd/console#29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants