Hi Alex,

Ack for the patch, but have one comment

I understand using  SIGUSR2 for Control Block dumping is not the generic way as 
we are using USR2 signal for dynamically enabling Traces.  we added this 
because at times Traces are not enough for debugging and dump routine dumps the 
complete Control Block information,  State and handlers  which will be very 
much use full in debugging. 

My suggestion is instead of deleting the usr2_sig_handler and Signal initialize 
code, Comment out the code and add a comment saying that if user wants to do 
dump PLM CB for debugging they can uncomment the code

Thanks,
Ravi 
-----Original Message-----
From: Alex Jones [mailto:ajo...@rbbn.com] 
Sent: Thursday, March 08, 2018 2:09 AM
To: Ravi Sekhar Reddy Konda <ravisekhar.ko...@oracle.com>
Cc: opensaf-devel@lists.sourceforge.net; Alex Jones <ajo...@rbbn.com>
Subject: [PATCH 1/1] plmd: enable dynamic tracing [#2796]

Dynamic tracing does not work with plmd.

plmd overrides the USR2 signal with its own dump routine.

Remove the signal hander code for USR2 in plmd.
---
 src/plm/plmd/plms_main.c | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/src/plm/plmd/plms_main.c b/src/plm/plmd/plms_main.c index 
23b019444..5de1f461e 100644
--- a/src/plm/plmd/plms_main.c
+++ b/src/plm/plmd/plms_main.c
@@ -70,20 +70,6 @@ static void sigusr1_handler(int sig)
        ncs_sel_obj_ind(&plms_cb->usr1_sel_obj);
 }
 
-static void usr2_sig_handler(int sig)
-{
-       PLMS_CB *cb = plms_cb;
-       PLMS_EVT *evt;
-       evt = (PLMS_EVT *)malloc(sizeof(PLMS_EVT));
-       memset(evt, 0, sizeof(PLMS_EVT));
-       evt->req_res = PLMS_REQ;
-       evt->req_evt.req_type = PLMS_DUMP_CB_EVT_T;
-       (void)sig;
-       /* Put it in PLMS's Event Queue */
-       m_NCS_IPC_SEND(&cb->mbx, (NCSCONTEXT)evt, NCS_IPC_PRIORITY_HIGH);
-       signal(SIGUSR2, usr2_sig_handler);
-}
-
 /****************************************************************************
  * Name          : plms_db_init
  *
@@ -327,12 +313,6 @@ static uint32_t plms_init()
                rc = NCSCC_RC_FAILURE;
                goto done;
        }
-       /* Initialize a signal handler for debugging purpose */
-       if ((signal(SIGUSR2, usr2_sig_handler)) == SIG_ERR) {
-               LOG_ER("signal USR2 failed: %s", strerror(errno));
-               rc = NCSCC_RC_FAILURE;
-               goto done;
-       }
 
        if (!cb->nid_started && plms_amf_register() != NCSCC_RC_SUCCESS) {
                LOG_ER("AMF Initialization failed");
--
2.13.6


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to