*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> rfork_thread (3)              



NAME    [Toc]    [Back]

     rfork_thread -- create a rfork-based process thread

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     rfork_thread(int flags, void *stack, int (*func)(void *arg), void *arg);

DESCRIPTION    [Toc]    [Back]

     The rfork_thread() function is a helper function for rfork(2).  It
     arranges for a new process to be created and the child process will call
     the specified function with the specified argument, while running on the
     supplied stack.

     Using this function should avoid the need to implement complex stack swap

RETURN VALUES    [Toc]    [Back]

     Upon successful completion, rfork_thread() returns the process ID of the
     child process to the parent process.  Otherwise, a value of -1 is
     returned to the parent process, no child process is created, and the
     global variable errno is set to indicate the error.

     The child process context is not aware of a return from the
     rfork_thread() function as it begins executing directly with the supplied

ERRORS    [Toc]    [Back]

     See rfork(2) for error return codes.

SEE ALSO    [Toc]    [Back]

     fork(2), intro(2), minherit(2), rfork(2), vfork(2)

HISTORY    [Toc]    [Back]

     The rfork_thread() function first appeared in FreeBSD 4.3.

FreeBSD 5.2.1			 July 29, 2000			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
pthread_create FreeBSD create a new thread
pthread_create OpenBSD create a new thread
idisk HP-UX create partitions for Itanium(R)-based system's disks
ecfind IRIX report processes using process-based event counters
pthread_create IRIX create and start a thread
pset_bind HP-UX bind process or thread to a processor set
raise Tru64 Send a signal to the executing process or thread
tt_thread_procid HP-UX identify the default process for the currently active thread
pcreate IRIX create a process
fork HP-UX create a new process
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service