Re: Implementing vfork

1999-08-02 Thread Robert de Bath
I've used a machine with a real vfork() before now. The parent would crash if the child left the function that vfork() is called from. vfork is designed for just one purpose, a cheap replacment for fork() for when you're spawning a new process from a shell (like program). It must be used in code

Re: Implementing vfork

1999-07-28 Thread Alistair Riddoch
Eric J. Korpela writes: : The parent process's data segment is not copied, just re-alloced, and : rather than returning to the parrent process, fork sleeps on the parents : child_wait wait queue. Let me try to remind myself of the vfork semantics Basically, rather

RE: Implementing vfork

1999-07-28 Thread Greg Haerr
: This is essentially what I have done. The only problem with doing this is : that when fork() returns to the child, and the child calls exec(), the stack : will be modified, so when the parent comes to return from fork(), it will : crash, or at best do something odd. Ok. When vfork()

Re: Implementing vfork

1999-07-28 Thread Alistair Riddoch
Greg Haerr writes: : This is essentially what I have done. The only problem with doing this is : that when fork() returns to the child, and the child calls exec(), the stack : will be modified, so when the parent comes to return from fork(), it will : crash, or at best do something odd.

RE: Implementing vfork

1999-07-28 Thread Greg Haerr
: : : The scheme I am using at the moment, that of copying the bottom 100 bytes : : of the stack for the child to use, works, but does not really offer any : : kind of safety net. Is it fair to just accept that if a process vfork()s, : : and does not exec or exit, but instead carries on, it

RE: Implementing vfork

1999-07-27 Thread Matthew Kirkwood
On Tue, 27 Jul 1999, Greg Haerr wrote: : The parent process's data segment is not copied, just re-alloced, and : rather than returning to the parrent process, fork sleeps on the parents : child_wait wait queue. Let me try to remind myself of the vfork semantics Basically, rather than

Re: Implementing vfork

1999-07-27 Thread Eric J. Korpela
: The parent process's data segment is not copied, just re-alloced, and : rather than returning to the parrent process, fork sleeps on the parents : child_wait wait queue. Let me try to remind myself of the vfork semantics Basically, rather than copying the data segment on