Re: [dev] [dwm] with SIGCHLD commit, dwm cannot launch dmenu_extended.

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sun, 9 Apr 2023 12:51:13 +0200

On Sat, Apr 08, 2023 at 11:02:56PM +0200, Storkman wrote:
> On Sat, Apr 08, 2023 at 04:28:15PM +0200, pfx_AT_mailbox.org wrote:
> > Hello everyone,
> >
> > I bind keyboard shortcut to launch dmenu_extended[1] in dwm, what works
> > flawlessly before the `Use sigaction(SA_NOCLDWAIT) for SIGCHLD
> > handling` [1] commit, since dmenu_extended does not change anything here,
> > is this a regression or bug introduced with this commit or
> > dmenu_extended need to adapt to conform the change? thanks.
>
> From sigaction(2):
> > A child created via fork(2) inherits a copy of its parent's signal dispositions.
> > During an execve(2), the dispositions of handled signals are reset to the default;
> > the dispositions of ignored signals are left unchanged.
>
> This would explain why running programs affected by this through st works,
> since it runs "signal(SIGCHLD, SIG_DFL)" before executing the shell (st.c:715).
>
> Adding "signal(SIGCHLD, SIG_DFL)" before execvp in spawn() at dwm.c:1657 fixes
> anki and mpv with youtube-dl for me.
>
> >
> > [1] https://github.com/MarkHedleyJones/dmenu-extended/
> > [2] https://git.suckless.org/dwm/commit/712d6639ff8e863560328131bbb92b248dc9cde7.html
> >
>

Thanks,

I've committed a fix based on your suggestion to dwm.
I also committed it for tabbed as it had a similar change.

If there are further iterations or patch suggestions feel free to reply,

-- 
Kind regards,
Hiltjo
Received on Sun Apr 09 2023 - 12:51:13 CEST

This archive was generated by hypermail 2.3.0 : Sun Apr 09 2023 - 13:00:09 CEST