Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 1997 20:04:44 +0200
From:      Stefan Esser <se@freebsd.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        ache@freebsd.org, cvs-all@freebsd.org, CVS-committers@freebsd.org, cvs-usrbin@freebsd.org
Subject:   vfork problem in gcc (was: Re: cvs commit:  src/usr.bin/vacation vacation.c)
Message-ID:  <19970424200444.24901@x14.mi.uni-koeln.de>
In-Reply-To: <199704240959.TAA12833@godzilla.zeta.org.au>; from Bruce Evans on Thu, Apr 24, 1997 at 07:59:41PM %2B1000
References:  <199704240959.TAA12833@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 24, Bruce Evans <bde@zeta.org.au> wrote:
> >  Modified:    usr.bin/vacation  vacation.c
> >  Log:
> >  Better fix: return vfork() again, but remove clobbering fclose()
> >  and use _exit() instead of exit()
> 
> I think it's better to use fork() except in programs that fork a lot.
> Even the simplest use:
> 
> 	if ((pid = vfork()) == 0)
> 		execl(...);
> 
> is not guaranteed to work (it depends on there being a stack frame and
> the compiler not doing anything unusual with it).

I had just fail "gcc -pipe" with an "vfork: interrupted system call"
(from memory) message. This happened reproducible with one certain
source file, removing "-pipe" allowed to compile that file, too ...

This might affect people doing a "make world" with "-pipe", I guess.
There is only one use of vfork in gcc.c (on line 2061). Lots of files
that are closed in the child, and it does call exit(), if the exec()
fails ... 

Regards, STefan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970424200444.24901>