Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stdout already set error in macos #18

Open
xudifsd opened this issue Mar 17, 2016 · 2 comments
Open

Stdout already set error in macos #18

xudifsd opened this issue Mar 17, 2016 · 2 comments

Comments

@xudifsd
Copy link

xudifsd commented Mar 17, 2016

I'm using osx 10.9.5, and following snippet gives a strange output:

package main

import (
    "fmt";
    "github.com/robertknight/clipboard";
    "time";
)

func main() {
    for {
        s, err := clipboard.ReadAll();
        if err != nil {
            fmt.Printf("%s\n", err);
        }
        fmt.Printf("%s\n", s);
        time.Sleep(1000 * time.Millisecond);
    }
}

it prints:
whatever in clipboard
exec: Stdout already set
exec: Stdout already set
...

how can I fix this?

@atotto
Copy link
Owner

atotto commented Jun 23, 2016

Hi,

I cannot reproduce it on my osx 10.9.5(go version go1.6.2 darwin/amd64) and 10.11.4(go version go1.6 darwin/amd64).
What version of Go are you using (go version)?

Maybe the error is coming from https://golang.org/src/os/exec/exec.go#L420 .

Thanks.

@atotto
Copy link
Owner

atotto commented Jun 23, 2016

P.S.

I use the following code:

package main

import (
    "fmt"
    "time"

    "github.com/atotto/clipboard"
)

func main() {
    for {
        s, err := clipboard.ReadAll()
        if err != nil {
            fmt.Printf("%s\n", err)
        }
        fmt.Printf("%s\n", s)
        time.Sleep(1000 * time.Millisecond)
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants