[comp.unix.xenix.sco] Simulating vfork under SCO Xenix

bent@lccinc.UUCP (Ben Taylor) (01/26/91)

I am currently working on getting tcl working under Xenix, and have solved
some initial problems.  However, not having much berkeley background,
I am unfamiliar with vfork.  I know what its supposed to do, but I'm
not sure how to make Xenix simulate it.  Anyone have suggestions?

Ben Taylor
Systems Administrator
LCC Incorporated
uunet!lccinc!bent

cpcahil@virtech.uucp (Conor P. Cahill) (01/26/91)

In article <345@lccinc.UUCP> bent@lccinc.UUCP (Ben Taylor) writes:
>I am currently working on getting tcl working under Xenix, and have solved
>some initial problems.  However, not having much berkeley background,
>I am unfamiliar with vfork.  I know what its supposed to do, but I'm
>not sure how to make Xenix simulate it.  Anyone have suggestions?

You can usually just #define vfork fork.  HOWEVER, if they were tricky
about changing variables following the vfork, this may not work.  If all 
they do is exec a different program the #def will be fine.

If they did modify viriables following the vfork, you are out of luck (it
can't be emulated cleanly under Xenix).
-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 

rbj@uunet.UU.NET (Root Boy Jim) (01/26/91)

In article <345@lccinc.UUCP> bent@lccinc.UUCP (Ben Taylor) writes:
>I am unfamiliar with vfork.  I'm not sure how to make Xenix simulate it.

#define vfork fork
-- 

	Root Boy Jim Cottrell <rbj@uunet.uu.net>
	Close the gap of the dark year in between

jim@newmedia.UUCP (Jim Beveridge) (01/28/91)

In article <345@lccinc.UUCP>, bent@lccinc.UUCP (Ben Taylor) writes:
> I am currently working on getting tcl working under Xenix, and have solved
> some initial problems.  However, not having much berkeley background,
> I am unfamiliar with vfork.  I know what its supposed to do, but I'm
> not sure how to make Xenix simulate it.  Anyone have suggestions?

vfork() gives you some performance gains over fork().  From the
SunOS 4.1 manual, we get, "vfork() can be used to create new
processes without fully copying the address space of the old
process, which is horrendously inefficient in a paged environment.
It is useful when the purpose of fork() would have been to create
a new system context for execve."

The simplest solution is:

#define vfork fork


		Jim