From owner-freebsd-current Tue Apr 22 12:07:35 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id MAA03875 for current-outgoing; Tue, 22 Apr 1997 12:07:35 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA03868; Tue, 22 Apr 1997 12:07:29 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id FAA30007; Wed, 23 Apr 1997 05:04:52 +1000 Date: Wed, 23 Apr 1997 05:04:52 +1000 From: Bruce Evans Message-Id: <199704221904.FAA30007@godzilla.zeta.org.au> To: ache@nagual.ru, toor@dyson.iquest.net Subject: Re: Recent vfork kernel changes broke csh & tcsh! Cc: bde@zeta.org.au, current@freebsd.org, dyson@freebsd.org Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Can we left vfork at traditional BSD stage and not make it >as powerful as rfork is? It seems some programs expect traditional >semantics... I thought that we were just implementing traditional BSD semantics. Traditional compilers and mallocs were weaker, so vfork() worked although its interface is fundamentally broken. >BTW, alternative way will be fixing such programs to preserve more >variables before forking, but it is relatively hard task. I try to see >what csh child clobbers, but give up, i.e. can't find what it was. >Preserving process list f.e. not helps... I hope there are few programs that use it as evilly as csh. In src/bin, it is used right in mv (except fork failure is mishandled), rcp and rmail (rmail has YA version of popen). In src/sbin, it is used brokenly (but is probably OK because the compiler doesn't allocate the child variables space-optimally). In usr.bin/vacation, it is used very brokenly (mfp is fclosed() in the child and then used in the parent). Other cases in usr.bin and usr.sbin seem to be OK in practice. This shows that it is too dangerous to fix vfork(). Does Netscape use it? :-) Bruce