Hi Minh,
Ack with one question.
What happens if user does following sequence:
1) Init service handle
--> Have this env variable set, then unset later on.
2) Finalize the handle
3) Init service handle
--> I am not sure if previous unset has any affects to tipc flow control
from this point
e.g. has tipc flow control been disabled from previous unset?
Regards, Vu
On 10/31/19 5:32 AM, Minh Chau wrote:
Patch unsets MDS_TIPC_FCTRL_ENABLED, MDS_TIPC_FCTRL_ACKTIMEOUT,
and MDS_TIPC_FCTRL_ACKSIZE to prevent child process inheritance.
---
src/mds/mds_dt_tipc.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c
index e7a7b48..12b275d 100644
--- a/src/mds/mds_dt_tipc.c
+++ b/src/mds/mds_dt_tipc.c
@@ -367,6 +367,19 @@ uint32_t mdtm_tipc_init(NODE_ID nodeid, uint32_t
*mds_tipc_ref)
}
mds_tipc_fctrl_initialize(tipc_cb.BSRsock, port_id,
optval,
ackto, acksize, tipc_mcast_enabled);
+ /* unset the env var to prevent child process
inheritance */
+ if (unsetenv("MDS_TIPC_FCTRL_ENABLED") != 0) {
+ syslog(LOG_ERR,
+ "MDTM:TIPC Failed to unset
MDS_TIPC_FCTRL_ENABLED");
+ }
+ if (ackto != -1 &&
unsetenv("MDS_TIPC_FCTRL_ACKTIMEOUT") != 0) {
+ syslog(LOG_ERR,
+ "MDTM:TIPC Failed to unset
MDS_TIPC_FCTRL_ACKTIMEOUT");
+ }
+ if (acksize != -1 && unsetenv("MDS_TIPC_FCTRL_ACKSIZE")
!= 0) {
+ syslog(LOG_ERR,
+ "MDTM:TIPC Failed to unset
MDS_TIPC_FCTRL_ACKSIZE");
+ }
} else {
syslog(LOG_ERR, "MDTM:TIPC Invalid value of"
"MDS_TIPC_FCTRL_ENABLED");
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel