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

  man pages->IRIX man pages -> atfork (3c)              
Title
Content
Arch
Section
 

Contents


atfork(3C)							    atfork(3C)


NAME    [Toc]    [Back]

     atfork_child, atfork_child_prepend, atfork_parent,	atfork_pre - add fork
     pre and post interception routines

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     int atfork_child (void (*func)(void));

     int atfork_child_prepend (void (*func)(void));

     int atfork_parent (void (*func)(int errno,int pid));

     int atfork_pre (void (*func)(void));

DESCRIPTION    [Toc]    [Back]

     atfork_child adds the function func to the	end of a list of functions to
     be	called without arguments on entry of a child process created by
     fork(2).  atfork_child_prepend performs the same task, but	it adds	the
     function at the beginning of the list.  At	most 32	functions may be
     registered	by atfork_child	or atfork_child_prepend.  The functions	will
     be	called in list order.

     atfork_parent adds	the function func to a list of functions to be called
     with two integer arguments	after calling fork(2).	At most	32 functions
     may be registered by atfork_parent; the functions will be called in the
     same order	as their registration.

     atfork_pre	adds the function func to a list of functions to be called
     without arguments just preceeding a call to fork(2).  At most 32
     functions may be registered by atfork_pre;	the functions will be called
     in	the reverse order as their registration.

     atfork_child, atfork_child_prepend, atfork_parent,	and atfork_pre all
     return 0 if the registration succeeds. Otherwise, a value of -1 is
     returned and errno	is set to indicate the error.

SEE ALSO    [Toc]    [Back]

      
      
     fork(2).


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
atsproc IRIX add sproc pre and post interception routines
pthread_atfork Tru64 Declares fork handler routines to be called when the calling thread's process forks a child process
pthread_atfork IRIX register fork() handlers
forkpty Tru64 Open and fork pseudoterminals
perlfork OpenBSD Perl's fork() emulation
openpty Tru64 Open and fork pseudoterminals
vm_map_inherit FreeBSD set fork inheritance flags for a range within a map
popup IRIX Post a popup menu
gsignal NetBSD post signal to a process
pgsignal NetBSD post signal to a process
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service