GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
RFORK_THREAD(3) FreeBSD Library Functions Manual RFORK_THREAD(3)

rfork_thread
create a rfork-based process thread

Standard C Library (libc, -lc)

#include <unistd.h>

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

The rfork_thread() function has been deprecated in favor of pthread_create(3).

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 code.

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 function.

See rfork(2) for error return codes.

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

The rfork_thread() function first appeared in FreeBSD 4.3.
February 6, 2011 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.