• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Fwd: Re: execv bug???]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: [Fwd: Re: execv bug???]
      • From: Terry Lambert <email@hidden>
    • Re: [Fwd: Re: execv bug???]
      • From: Jonas Maebe <email@hidden>
References: 
 >[Fwd: Re: execv bug???] (From: Steve <email@hidden>)

  • Prev by Date: [Fwd: Re: execv bug???]
  • Next by Date: Re: Running a time consuming background process
  • Previous by thread: [Fwd: Re: execv bug???]
  • Next by thread: Re: [Fwd: Re: execv bug???]
  • Index(es):
    • Date
    • Thread