mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 22:37:14 +08:00
c0c8edb9e8
Since the gid=X and mode=Y flags can be set inside config.json as mount options, don't override them with our own defaults. This avoids /dev/pts/* not being owned by tty in a regular container, as well as all of the issues with us implementing grantpt(3) manually. This is the least opinionated approach to take. This patch is part of the console rewrite patchset. Reported-by: Mrunal Patel <mrunalp@gmail.com> Signed-off-by: Aleksa Sarai <asarai@suse.de>
31 lines
586 B
Go
31 lines
586 B
Go
package libcontainer
|
|
|
|
// newConsole returns an initialized console that can be used within a container
|
|
func newConsole() (Console, error) {
|
|
return &windowsConsole{}, nil
|
|
}
|
|
|
|
// windowsConsole is a Windows pseudo TTY for use within a container.
|
|
type windowsConsole struct {
|
|
}
|
|
|
|
func (c *windowsConsole) Fd() uintptr {
|
|
return 0
|
|
}
|
|
|
|
func (c *windowsConsole) Path() string {
|
|
return ""
|
|
}
|
|
|
|
func (c *windowsConsole) Read(b []byte) (int, error) {
|
|
return 0, nil
|
|
}
|
|
|
|
func (c *windowsConsole) Write(b []byte) (int, error) {
|
|
return 0, nil
|
|
}
|
|
|
|
func (c *windowsConsole) Close() error {
|
|
return nil
|
|
}
|