On Mon, 27 Jun 2016 06:26:59 -0700 (PDT)
Michael Soulier <msoul...@gmail.com> wrote:

> > Hmm. Maybe I misunderstand how runsv connects the two. A simple
> > shell test seems to behave more as expected. I'll need to dig.
> >
> I think I found it. On read I'm getting "resource temporarily
> unavailable", so I suspect runsv has set stdin to be non-blocking.
> 
> select() is the only way I know of to work with a non-blocking file 
> descriptor. Now if I can only get select to work.

A pipe has two ends.  Is it possible for you to just make os.Stdin
blocking again before attempting to read from it?

Something like

  import (
    "os"
    "syscall"
  )
  ...
  err = syscall.SetNonblock(os.Stdin.Fd(), false)

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to