Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

add -q option to disable printing to stdout #158

Closed
wants to merge 1 commit into from

Conversation

Humm42
Copy link
Contributor

@Humm42 Humm42 commented Oct 6, 2021

Printing the status to stdout can be undesirable, as blocking pipes with
a filled buffer … block. Because of that, when using -s for starting a
process not reading its stdin, such as service managers, after some
usage dwl will freeze.

Printing the status to stdout can be undesirable, as blocking pipes with
a filled buffer … block.  Because of that, when using -s for starting a
process not reading its stdin, such as service managers, after some
usage dwl will freeze.
@djpohly
Copy link
Owner

djpohly commented Oct 6, 2021

How about closing stdin on the service manager? The startup command is fed to /bin/sh -c, so you can use something like:

dwl -s 's6-svscan ./local/share/s6 <&-'

and dwl will ignore the SIGPIPE/EPIPE when it tries to write.

@Humm42
Copy link
Contributor Author

Humm42 commented Oct 6, 2021

How about closing stdin on the service manager?

would work just fine; seems less intuitive to me—would still mention the problem in the docs README

djpohly added a commit that referenced this pull request Oct 6, 2021
@djpohly
Copy link
Owner

djpohly commented Oct 6, 2021

Sounds totally reasonable. I've updated the README to mention the behavior and provide the <&- solution.

Now to find out who does and doesn't read the README. :)

@Humm42 Humm42 closed this Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants