Re: [dev] [surf] Zombies when forking

From: C.J. Wagenius <cjw_AT_voidptr.se>
Date: Tue, 17 Sep 2019 21:01:24 +0200 (CEST)

Thanks for info.

There's something messed up with my system. SIGCHLD is never caught. :(

/cjw


17 sep. 2019 17:08 av nullplan_AT_gmx.net:

> On Tue, Sep 17, 2019 at 12:15:59PM +0200, C.J. Wagenius wrote:
>
>> Hi.
>>
>> I'm using surf on void linux (musl). I get a whole lot of zombies (sh <defunct>) when spawning child processes (Go & Find). I don't know where the optimal place is to put a waitpid for them but this works for me.
>>
>> # --- Start patch
>> index 2b54e3c..ef1309b 100644
>> --- a/surf.c
>> +++ b/surf.c
>> _AT_@ -1327,6 +1327,7 @@ winevent(GtkWidget *w, GdkEvent *e, Client *c)
>> {
>>         int i;
>>
>> +       waitpid((pid_t)-1, NULL, WNOHANG);
>>         switch (e->type) {
>>         case GDK_ENTER_NOTIFY:
>>                 c->overtitle = c->targeturi;
>> # --- End patch
>>
>> Thanks for awesome software.
>>
>> /cjw
>>
>
> You know, if no place in the code ever calls wait* except this line,
> might be simpler to just set SIGCHLD to SIG_IGN during initialization.
>
> Ciao,
> Markus
>
Received on Tue Sep 17 2019 - 21:01:24 CEST

This archive was generated by hypermail 2.3.0 : Tue Sep 17 2019 - 21:12:09 CEST