Back to home page

Enduro/X

 
 

    


0001 NDRX_ATFORK_PREPARE(3)
0002 ======================
0003 :doctype: manpage
0004 
0005 
0006 NAME
0007 ----
0008 ndrx_atfork_prepare - Function to be called before fork, if not using ndrx_fork(3)
0009 
0010 
0011 SYNOPSIS
0012 --------
0013 #include <atmi.h>
0014 
0015 void ndrx_atfork_prepare(void);
0016 
0017 For XATMI client link with '-latmiclt -latmi -lubf -lnstd -lpthread -lrt -lm'
0018 
0019 For XATMI server link with '-latmisrv|-latmisrvnomain|-latmisrvinteg -latmi -lubf -lnstd -lpthread -lrt -lm'
0020 
0021 DESCRIPTION
0022 -----------
0023 When process is about to copy it self (i.e. perform forking in UNIX terms),
0024 Enduro/X requires certain tasks to be performed before this action. Particularly,
0025 if System V IPC transport is used by Enduro/X, then auxiliary threads shall be
0026 terminated and contexts released. Thus if doing manual *fork()*, then before this
0027 call, parent shall call *ndrx_atfork_prepare()* procedure. Procedure can 
0028 be registered with *pthread_atfork()*, passing it to 'prepare' argument.
0029 
0030 At given time function does some logic by System V IPC, for other IPC
0031 no logic is executed. But this fact is subject of change, and in future releases 
0032 some other tasks might be required to be one by Enduro/X before process forking, 
0033 thus it is recommended to use *ndrx_fork()*, call manually 
0034 *ndrx_atfork_prepare()* or register it with *pthread_atfork()*
0035 
0036 RETURN VALUE
0037 ------------ 
0038 *N/A*
0039 
0040 ERRORS
0041 ------
0042 *N/A*
0043 
0044 BUGS
0045 ----
0046 Report bugs to support@mavimax.com
0047 
0048 SEE ALSO
0049 --------
0050 *ndrx_fork(3)* *ndrx_atfork_parent(3)* *ndrx_atfork_child(3)*
0051 
0052 
0053 COPYING
0054 -------
0055 (C) Mavimax, Ltd
0056