Re: [go-nuts] tail -F with cmd.StdoutPipe, tail blocks in write

2020-05-16 Thread 'Michael Stiller' via golang-nuts
>> >> tail is from coreutils 8.25-2ubuntu3~16.04, kernel 4.4.0-1083-aws >> >> It looks like i cannot read lines that way and tail is blocking in write(1, >> ... > > Running "tail -F" never terminates. That's how it works. Your call > to Wait will never complete. Hi Ian, of course you are co

Re: [go-nuts] tail -F with cmd.StdoutPipe, tail blocks in write

2020-05-16 Thread Ian Lance Taylor
On Sat, May 16, 2020 at 4:27 AM 'Michael Stiller' via golang-nuts wrote: > > i try to read tailed lines of a logfile using this approach: > > if env.TailEnabled { >log.Println("setup tail command") >cmd := exec.Command("/usr/bin/tail", "-F", "logfile.log") >log.Println("setup tail pipe

[go-nuts] tail -F with cmd.StdoutPipe, tail blocks in write

2020-05-16 Thread 'Michael Stiller' via golang-nuts
Hi, i try to read tailed lines of a logfile using this approach: if env.TailEnabled { log.Println("setup tail command") cmd := exec.Command("/usr/bin/tail", "-F", "logfile.log") log.Println("setup tail pipe") tailPipe, err := cmd.StdoutPipe() if err != nil { log.Fatalln("coul