[torqueusers] qmgr truncates output in batch mode
jan.jn.nilsson at consultant.volvo.com
Thu Jun 11 08:58:30 MDT 2009
We have experienced some problems using "qmgr -c <cmd>" in scripts.
The output seemed truncated or the qmgr was crashing prematurely.
When analyzing it in depth - we found that it seems to be connected to
"qmgr" using the readline() utility.
My colleague found that adding a fflush(NULL) before exiting solved the
Here's the fix that was applied:
# diff -Naur cmds*/qmgr.c
--- cmds.old/qmgr.c 2009-06-11 16:04:47.000000000 +0200
+++ cmds/qmgr.c 2009-06-11 16:22:08.000000000 +0200
@@ -313,6 +313,7 @@
+ fflush(NULL); /* peter h IPSec 2009 * fix truncated output */
if (aopt && errflg)
I'm not sure if this is the best solution - but it fixed the problem.
Please comment - and use at your own discretion.
I'll try to make an bugzilla report out ASAP. Wish me luck :-)
More information about the torqueusers