Coder Social home page Coder Social logo

Comments (2)

cdown avatar cdown commented on August 22, 2024 1

I think the only solution here is to discard these and go back to /dev/null, sadly. I can't think of any other way to get xclip to write to stderr directly instead of trying to reopen through /dev/stderr and the like.

I've at least kept stderr where possible.

from clipmenu.

cdown avatar cdown commented on August 22, 2024

By changing the _xsel function to look like this:

_xsel() {
    xsel --logfile "$xsel_log" "$@" &
    kill -STOP "$!"
    ls -l /proc/"$!"/fd/
    kill -CONT "$!"
    wait
}

We can see that the fds look like this:

Oct 29 10:29:14 roujiamo clipmenud[10899]: total 0
Oct 29 10:29:14 roujiamo clipmenud[10899]: lr-x------ 1 cdown cdown 64 Oct 29 10:29 0 -> pipe:[417750]
Oct 29 10:29:14 roujiamo clipmenud[10899]: lrwx------ 1 cdown cdown 64 Oct 29 10:29 1 -> socket:[417708]
Oct 29 10:29:14 roujiamo clipmenud[10899]: l-wx------ 1 cdown cdown 64 Oct 29 10:29 10 -> /run/user/1000/clipmenu.4.cdown/lock
Oct 29 10:29:14 roujiamo clipmenud[10899]: lrwx------ 1 cdown cdown 64 Oct 29 10:29 2 -> socket:[417708]
Oct 29 10:29:14 roujiamo clipmenud[10899]: xsel: error opening logfile /proc/self/fd/2 for writing: No such device or address

This makes sense. You can't indirectly use a filename which goes to a socket, you have to use the socket directly.

Hmm.

from clipmenu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.