Make it possible to disable stdin when terminal is enabled
Signed-off-by: Random-Liu <lantaol@google.com>
This commit is contained in:
parent
0fe0d8feeb
commit
f04d74d099
@ -15,11 +15,13 @@ import (
|
||||
)
|
||||
|
||||
func copyConsole(ctx context.Context, console console.Console, stdin, stdout, stderr string, wg *sync.WaitGroup) error {
|
||||
in, err := fifo.OpenFifo(ctx, stdin, syscall.O_RDONLY, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
if stdin != "" {
|
||||
in, err := fifo.OpenFifo(ctx, stdin, syscall.O_RDONLY, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
go io.Copy(console, in)
|
||||
}
|
||||
go io.Copy(console, in)
|
||||
outw, err := fifo.OpenFifo(ctx, stdout, syscall.O_WRONLY, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user