
1. Forward stdin/stdout/stderr to the target process when in foreground mode instead of always forwarding the current tty (issue #1964) 2. When redirecting a file descriptor make sure to also specify something for all three otherwise debugserver will misbehave (either exit on launch or run but giving the target process a closed file descriptor). Fixes #1964
16 lines
171 B
Go
16 lines
171 B
Go
package main
|
|
|
|
import (
|
|
"bufio"
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
s := bufio.NewScanner(os.Stdin)
|
|
for s.Scan() {
|
|
fmt.Printf("read %q\n", s.Text())
|
|
}
|
|
os.Stdout.Close()
|
|
}
|