[Info-vax] Looking into C-include files on VMS
Bob Eager
rde42 at spamcop.net
Thu Oct 29 10:01:19 EDT 2009
On Thu, 29 Oct 2009 08:04:25 -0600, Bob Koehler wrote:
> In article <7krs6vF3af5v3U10 at mid.individual.net>, Bob Eager
> <rde42 at spamcop.net> writes:
>>
>> You miss the point. They are talking about VMS SPAWN, which is unlike
>> vfork()+exec(). It is nearer to creating a new (empty) process and
>> loading a program into it.
>
> Doesn't that end up with the same thing? I would expect vfork() to
> start a new process and exec() to load a new program into it.
No, it is *much* more expensive (no criticism of VMS, which has a
completely different philosophy), and one would not want to do it too
often.
vfork() doesn't start a new process. fork() does, and clones the existing
process into it. vfork() effectively starts a new thread in the current
process, and on the next exec(), the new process is created. But the UNIX
philosophy is that this is a cheap operation (it doesn't have F11ACP
mapped into it (if that still happens), nor DCL).
> In fact, the C RTL does have a pair of routines (or macros in the
> approriate header file) called vfork() and exec() that end up
> spawning a new process running a new program. Just don't expect the
> implementation to look like those in UNIX.
Exactly. It 'costs' quite a bit more. Fair enough, but it means that a
proper port ought to consider those issues and not just do them 'the UNIX
way'.
--
Use the BIG mirror service in the UK:
http://www.mirrorservice.org
More information about the Info-vax
mailing list