[PATCH] libfortran/90038 Reap dead children when wait=.false.
Janne Blomqvist
blomqvist.janne@gmail.com
Mon May 20 17:49:00 GMT 2019
On Mon, May 20, 2019 at 8:24 PM Janne Blomqvist
<blomqvist.janne@gmail.com> wrote:
>
> On Mon, May 20, 2019 at 1:25 AM Manfred Schwarb <manfred99@gmx.ch> wrote:
> >
> > Hi Janne,
> >
> > Am 19.05.19 um 12:40 schrieb Janne Blomqvist:
> > > When using posix_spawn or fork to launch a child process, the parent
> > > needs to wait for the child, otherwise the dead child is left as a
> > > zombie process. For this purpose one can install a signal handler for
> > > SIGCHLD.
> > >
> >
> > Could you consider backporting this to gfortran 9? I would really appreciate it.
> > Up to now, wait=.FALSE. was really not usable for me in a lot of cases, which
> > is a pity.
> > I have some programs which need to read ~100000 files, which need to be
> > pre-processed. I could not do the obvious optimization to execute
> > pre-processing in background and directing output into a FIFO, and reading
> > data from this FIFO. Sadly, this results very quickly in
> > resources exhaustion (exhaustion of process ID's).
>
> Sure. While it's not a regression, it's quite obvious as well as self-contained.
>
> But why didn't you report it before if it was an issue that affected
> you? I just happened upon it when implementing the switch to
> posix_spawn. Without that happy accident, it might have gone unfixed
> deity knows how long.
>
> --
> Janne Blomqvist
Committed to GCC 9 branch as r271427.
--
Janne Blomqvist
More information about the Fortran
mailing list