From c082d05ecb18a57d7dec58caa49fcad37e77b71d Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Mon, 20 Dec 2010 21:00:49 +0000 Subject: [PATCH] Reset the timer on MPIR_being_debugged only if MPIR_being_debugged is not set. Fix typo in return code. This commit was SVN r24187. --- orte/mca/debugger/mpirx/mpirx.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/orte/mca/debugger/mpirx/mpirx.c b/orte/mca/debugger/mpirx/mpirx.c index 9fc2cb5838..338ee9c82f 100644 --- a/orte/mca/debugger/mpirx/mpirx.c +++ b/orte/mca/debugger/mpirx/mpirx.c @@ -238,22 +238,23 @@ static void open_fifo (void) static void attach_debugger(int fd, short event, void *arg) { orte_app_context_t *app; - unsigned char rc; - int ret; + unsigned char fifo_cmd; + int rc; int32_t ljob; orte_job_t *jdata; /* read the file descriptor to clear that event, if necessary */ if (fifo_active) { opal_event_del(&attach); + fifo_active = false; - ret = read(attach_fd, &rc, sizeof(rc)); - if (!ret) { + rc = read(attach_fd, &fifo_cmd, sizeof(fifo_cmd)); + if (!rc) { /* reopen device to clear hangup */ open_fifo(); return; } - if (1 != rc) { + if (1 != fifo_cmd) { /* ignore the cmd */ goto RELEASE; } @@ -335,7 +336,7 @@ static void attach_debugger(int fd, short event, void *arg) if (0 == orte_debugger_mpirx_check_rate) { fifo_active = true; opal_event_add(&attach, 0); - } else { + } else if (!MPIR_being_debugged) { ORTE_TIMER_EVENT(orte_debugger_mpirx_check_rate, 0, attach_debugger); }