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

herbe doesn't close itself (sometimes) #36

Open
faustri opened this issue Sep 13, 2021 · 4 comments · May be fixed by #40
Open

herbe doesn't close itself (sometimes) #36

faustri opened this issue Sep 13, 2021 · 4 comments · May be fixed by #40

Comments

@faustri
Copy link

faustri commented Sep 13, 2021

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?

@ghost
Copy link

ghost commented Oct 2, 2021

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

@N-R-K
Copy link

N-R-K commented Apr 13, 2022

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

herbe/herbe.c

Lines 73 to 80 in dec89e4

void expire(int sig)
{
XEvent event;
event.type = ButtonPress;
event.xbutton.button = (sig == SIGUSR2) ? (ACTION_BUTTON) : (DISMISS_BUTTON);
XSendEvent(display, window, 0, 0, &event);
XFlush(display);
}

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

N-R-K added a commit to N-R-K/herbe that referenced this issue Apr 14, 2022
@N-R-K N-R-K linked a pull request Apr 14, 2022 that will close this issue
@N-R-K
Copy link

N-R-K commented Apr 14, 2022

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

N-R-K added a commit to N-R-K/herbe that referenced this issue Apr 14, 2022
N-R-K added a commit to N-R-K/herbe that referenced this issue Apr 16, 2022
@ghost
Copy link

ghost commented Apr 19, 2022

@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.

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

Successfully merging a pull request may close this issue.

2 participants