Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Apr 1997 05:04:52 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        ache@nagual.ru, toor@dyson.iquest.net
Cc:        bde@zeta.org.au, current@freebsd.org, dyson@freebsd.org
Subject:   Re: Recent vfork kernel changes broke csh & tcsh!
Message-ID:  <199704221904.FAA30007@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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



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