Re: [Fwd: Re: execv bug???]
Re: [Fwd: Re: execv bug???]
- Subject: Re: [Fwd: Re: execv bug???]
- From: email@hidden (Peter Seebach)
- Date: Sun, 27 Jan 2008 13:56:56 -0600
In message <email@hidden>, Steve writes:
>So, are you suggesting then it could well be a bug with Leopard (it
>works fine on Tiger and, it works fine as coded by simply removing the
>v from vfork)? Obviously, the simple solution on Leopard for now is to
>use fork. I shall proceed to make a small test program and submit to
>Apple then.
I wouldn't consider it a significant bug; vfork is deprecated, having been
a performance hack to improve performance on the VAX. The existence of
modern systems with copy-on-write semantics makes it a waste of time to try
to make things work with vfork; further, I wouldn't necessarily expect either
process to be stable after calling vfork and then doing anything other than
exec* and exit -- there's nothing I know of stating that chdir() calls
can't have side-effects that include modification of the caller's address
space in some way, and you should never call anything that modifies the
caller's address space from the child side of a vfork.
See the vfork man page:
[EINVAL] A system call other than _exit() or execve() (or libc
functions that make no system calls other than those)
is called following calling a vfork() call.
chdir() is a syscall. It is an error to call chdir() inside the child of a
vfork.
-s
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden