This is the mail archive of the
mailing list for the GCC project.
Re: PATCH RFC: Remove fork from collect2
Gunther Nikl <email@example.com> writes:
> > Recall that this code is rarely used at present. We would get a
> > bigger benefit by converting pex-unix.c to use vfork, since that is
> > always used.
> This code used to use vfork but that support was dropped because of
> race condtions or something like that. My system (m68k-amigaos) doesn't
> support fork but has vfork.
Does your system have popen? Perhaps your system should just use
pexrd-generic, which uses popen instead of fork.
Alternatively, would you be willing to write a pexrd-amiga to be used
on your system? There is actually no need for the programs to run
concurrently. Everything will work fine if the program invoked by
pex_read() writes stdout to a temporary file, and pex_read() simply
returns the fopen of that temporary file. A pipe is used on Unix for
efficiency, not for correctness.