UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

#1 2007-08-17 02:31 AM

zhn636
Member
Registered: 2007-04-24
Posts: 146

Re: vfork problem

if I want to create a new process, which method can I use ?vfork() or fork()?
  what are the differences between these two functions?  when I need create a  process ,how do I decide which function I can use ?
  thanks

Offline

#2 2007-08-17 10:37 AM

i3839
Oddministrator
From: Amsterdam
Registered: 2003-06-07
Posts: 2,239

Re: vfork problem

Normally you read the manpage, and think, "yeah, that's the one I need".

If you don't read manpages you might need to ask trivial questions on public forums, which could be embarrassing.

You can also use clone() to create a new process, but that's Linux specific.

Offline

#3 2007-08-17 01:26 PM

RobSeace
Administrator
From: Boston, MA
Registered: 2002-06-12
Posts: 3,847
Website

Re: vfork problem

There's almost no need to ever use vfork() on any sane OS these days...  You
almost surely want to use plain old fork()...  If you needed vfork()'s rather wacky
behavior, you'd probably already know it...

Offline

Board footer

Powered by FluxBB