Subject: Re: bug#55441: [cuirass] hang in "In progress..."; runs out of pgsql connections

From: Ludovic Courtès <[email-masked]>
Date: Tue, 17 May 2022 14:52:06 +0200

Hi,

Maxim Cournoyer <[email-masked]> skribis:

> I'm not yet very knowledgeable about POSIX threads and shortcomings, but
> this looks like a dangerous trap to have lying around :-).  Is there an
> alternative implementation we could come up with that would avoid the
> potential problem (and warnings) entirely?

It *is* a dangerous trap, mitigated by the fact that our code execs soon
after fork, but that’s not great (“A fork() on the Road” explains the
many shortcomings of ‘fork’, including how it interacts with
multi-threaded code.)

As discussed on IRC yesterday, the longer-term approach is to augment
Guile is a posix_spawn-like primitive implemented in C.  If it’s in C,
we can make it do the right thing safely, as is done with ‘open-pipe’.

Thanks,
Ludo’.