Ack from me. Not tested /AndersBj
-----Original Message----- From: Hans Feldt [mailto:[email protected]] Sent: den 15 september 2014 13:43 To: Anders Widell; Anders Björnerstedt; Lennart Lund Cc: [email protected] Subject: [PATCH 2 of 3] imm: remove trace between fork and exec [#1077] osaf/services/saf/immsv/immnd/immnd_proc.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) Any function/system call between fork and exec in the child process is a potential risk of deadlock. The lock data structure is copied from the parent process and a locked mutex will never get unlocked in the child since when the parent process does unlock it won't affect the child copy of the lock. To prevent this from happening, tracing is removed between fork and exec. diff --git a/osaf/services/saf/immsv/immnd/immnd_proc.c b/osaf/services/saf/immsv/immnd/immnd_proc.c --- a/osaf/services/saf/immsv/immnd/immnd_proc.c +++ b/osaf/services/saf/immsv/immnd/immnd_proc.c @@ -1422,7 +1422,6 @@ static int immnd_forkLoader(IMMND_CB *cb (preLoad)?"preload":0, 0 }; - TRACE_5("EXEC %s %s %s", ldrArgs[0], ldrArgs[1], ldrArgs[2]); execvp(loaderName, ldrArgs); LOG_ER("%s failed to exec, error %u, exiting", base, errno); exit(1); @@ -1569,12 +1568,10 @@ static int immnd_forkPbe(IMMND_CB *cb) pbeArgs[2] = (cb->m2Pbe)?((cb->mIsCoord)?"--pbe2A":"--pbe2B"):"--pbe"; pbeArgs[3] = dbFilePath; pbeArgs[4] = 0; - LOG_IN("Exec: %s %s %s %s", pbeArgs[0], pbeArgs[1], pbeArgs[2], pbeArgs[3]); } else { pbeArgs[1] = (cb->m2Pbe)?((cb->mIsCoord)?"--pbe2A":"--pbe2B"):"--pbe"; pbeArgs[2] = dbFilePath; pbeArgs[3] = 0; - TRACE("Exec: %s %s %s", pbeArgs[0], pbeArgs[1], pbeArgs[2]); } execvp(execPath, pbeArgs); ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
