herbe icon indicating copy to clipboard operation
herbe copied to clipboard

herbe doesn't close itself (sometimes)

Open faustri opened this issue 4 years ago • 4 comments

I'm on alpine linux, using dwm in floating mode, herbe as standalone, and this script to put herbe in the background 'setsid nohup $@ &> /dev/null &'. Can't reproduce it at will, but often notice notification has stopped and have to find the herbe notification to click it away manually.

Anyone know what the issue could be?

faustri avatar Sep 13 '21 08:09 faustri

I'm on OpenBSD 6.9 and I also faced this issue a few times when using nohup

ghost avatar Oct 02 '21 12:10 ghost

Possible suspect is the fact that herbe is calling Xlib functions inside the signal handler.

https://github.com/dudik/herbe/blob/dec89e4d669a38a3f6dd8a6f2e2bae39f26369d3/herbe.c#L73-L80

You can only call functions which are async-signal-safe from inside a signal handler, see man 7 signal-safety.

N-R-K avatar Apr 13 '22 23:04 N-R-K

@faustri @alreadyburnt Try out #40 and see if that solves the issue or not.

N-R-K avatar Apr 14 '22 00:04 N-R-K

@N-R-K thanks for the PR. I don't know exactly when it happens but for now it seems to work fine. I'll come back here if I experience this issue again.

ghost avatar Apr 19 '22 02:04 ghost