Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SetText hangs indefinitely on Linux

See original GitHub issue

I’m not sure how no-one has noticed this yet, but here it is…

Since #137 was merged, the bashrunner xclip process (when calling SetText) never returns until copying something to the clipboard (e.g. pressing CTRL+C).

This is expected behavior since the xclip -loops option is set to 0 by default and xclip does not close stdout. From the man page:

-l, -loops
        number of X selection requests (pastes into X applications) to wait for before exiting, with a value of 0 (default)
        causing xclip to wait for an unlimited number of requests until another application (possibly another invocation of
        xclip) takes ownership of the selection

The solution seems to be adding -loops 1 to the command, but I’m not sure if this creates other problems… A different solutions is using xsel since it immediately closes stdout after forking.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

SimonCroppcommented, Dec 6, 2020

happy to accept that as a change. but first can u share a failing unit test that illustrates this issue

principiscommented, Dec 31, 2020

This is fixed with #345.

Thank you @mcon

Read more comments on GitHub >

github_iconTop Results From Across the Web

openssh - ssh command hangs indefinitely
I am trying to ssh into my ubuntu 18.04 remotely and my ssh command execution hangs after the password is authenticated.
Read more >
Why does dig utility hang indefinitely even with timeout ...
I would use an external utility to kill it after some time just in case, for the problematic situations where it hangs. As...
Read more >
SSH Command Execution Hangs, although interactive ...
And there it hangs, indefinitely. When I ssh without a command into my remote server, however, I get an interactive shell and all...
Read more >
Why do consoles sometimes hang forever when SSH ...
The long-hang behavior on communication issues is not a bug, the SSH session is hanging out hoping the other side will come back....
Read more >
networking - Curl response hangs
When I try, curl hangs before displaying the response and exiting. This is what I run: curl -vvv This is the output...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found