🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #11622

Re: vfork under 4.0

#11622
From: Guy Harris
Date: Wed, 22 Mar 1989 18:13
27 lines
1988 bytes
>Is there any reason to use vfork() under 4.0?

Yes - if you want your code to run with maximum efficiency on 4.xBSD
systems.  There is, I'm told, still a tiny performance improvement even in
SunOS 4.0, since it doesn't have to copy the data structures that define
the address space, nor does it have to mark all the copy-on-write pages as
non-writable (so it can take a trap and do the copy when an attempt is
made ot write them); however...

>Isn't fork just as efficient now that copy-on-write is implemented?

...it's probably efficient enough to render "vfork()" uninteresting if you
don't care about current 4.xBSD implementations.

>I see that the manual page still says "this system call will be
>eliminated when proper system sharing mechanisms are implemented".
>Is this just an anachronism, or a subtle attack on the 4.0
>implementation?

It's an anachronism, left over from the 4.xBSD manual pages.  Berkeley's
looking to implementing "proper system sharing mechanisms" in a future
release; I don't know if they'll nuke "vfork()" or not, however, since
there appear to be some disgusting programs that actually bogusly *use*
the memory-"sharing" "semantics" of "vfork()".  That's the main reason
"vfork()" isn't just a synonym for "fork()" in SunOS 4.0.  Berkeley might
just make it such a synonym in a future release, though, so if you've got
any such gross code, fix it now, before the fewmets hit the windmill....
Technical Details
Message-ID: <1139@auspex.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
References: <27717.8902241844@subnode.aiai.ed.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request
From: auspex!guy@uunet.uu.net (Guy Harris)
Newsgroups: comp.sys.sun
Subject: Re: vfork under 4.0
Keywords: SunOS
Message-ID: <1139@auspex.UUCP>
Date: 22 Mar 89 18:13:45 GMT
References: <27717.8902241844@subnode.aiai.ed.ac.uk>
Sender: usenet@rice.edu
Organization: Auspex Systems, Santa Clara
Lines: 27
Approved: Sun-Spots@rice.edu
Original-Date: 9 Mar 89 19:47:55 GMT
X-Sun-Spots-Digest: Volume 7, Issue 204, message 1 of 13