Hyperkit's go api could not create console on stdio.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- operating-systems
Research direction
Start by tracing the Go API paths for StdioInteractiveConsole and ConsoleStdio into run(), then inspect the isTerminal(os.Stdout) check and the subsequent StdoutPipe() call. Reproduce both cases with stdio attached to a TTY and confirm that the TTY case no longer returns the incorrect error and ConsoleStdio no longer reports "exec: Stdout already set."
Written by the indexing model from the issue text.
Description
Could not create console on stdio with ConsoleStdio or StdioInteractiveConsole
Case 1. StdioInteractiveConsole
If I set the value of Serial.InteractiveConsole to StdioInteractiveConsole to create console on stdio, it return an error:
If StdioInteractiveConsole is set, stdio must be a TTY.
Unlike the description of the error, this error occurs when isTerminal() condition returns true. That is, although stdio is a tty, error occurs.
if isTerminal(os.Stdout) {
return errors.New("If StdioInteractiveConsole is set, stdio must be a TTY")
}
Case 2. ConsoleStdio
If I set the value of Hyperkit.Console (without Serial) field to ConsoleStdio and call run(), an error occurs: exec: Stdout already set.
With stdio console, cmd.Stdout is set to os.Stdout (cmd.Stdout = os.Stdout). But the next line, cmd.StdoutPipe() method is called and the method return error when cmd.Stdout is not nil.
- Dominant language
- C
- Stars
- 3.7k
- Forks
- 336
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from moby/hyperkit
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
Similar issues
-
os:linux
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
mpv-player/mpv#18510 · 2 comments ·
-
internal.h中,漏掉了1个定义。 Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
kovidgoyal/kitty#10516 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100