
Adds features to support default file descriptor redirects for the target process: 1. A new command line flag '--redirect' and '-r' are added to specify file redirects for the target process 2. New syntax is added to the 'restart' command to specify file redirects. 3. Interactive instances will check if stdin/stdout and stderr are terminals and print a helpful error message if they aren't.
14 lines
164 B
Go
14 lines
164 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"io/ioutil"
|
|
"os"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
buf, _ := ioutil.ReadAll(os.Stdin)
|
|
fmt.Fprintf(os.Stdout, "%s %v\n", buf, time.Now())
|
|
}
|