This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Configure patch for vfork et al on VMS
On Thu, Dec 06, 2001 at 12:02:23PM -0800, Douglas B. Rupp wrote:
> vfork is a macro on VMS.
>
> fork is defined as vfork in a header file used to build gcc on VMS.
Okay.
> I don't understand your statement about not using "generic Unix"
> code for VMS. The only practical way to build and maintain gcc for
> VMS is to use the Unix-like facilities available in DECC RTL.
The file libiberty/pexecute.c abstracts a lot of the nuances of
spawning child processes under various operating systems. Currently
it's got specialized implementations for MS/DOS, Windows (with and
without cygwin), OS/2, MPW, and "everything else". The code for
"everything else" assumes the existence of a true fork - NOT vfork.
I'm recommending the addition of a VMS-specific block to that file.
(In case you're wondering what the problem is:
fprintf (stderr, "%s: ", this_pname);
fprintf (stderr, install_error_msg, program);
fprintf (stderr, ": %s\n", xstrerror (errno));
exit (-1);
None of that is safe after vfork(). You may not have noticed since
it's only executed if exec fails.)
zw