Above function call CHKQ is not getting called for the 2nd time.
in debug mode
Checking the Queue
+ CHKQ
++ wc -l
++ grep 11460
++ netstat -anp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
+ count=11
+ '[' 11 -eq 0 ']'
+ echo 11
11
+ echo 'Killing the Queue'
Killing the Queue
+ KILLQ
+ grep -v grep
+ tr -s ' ' ' '
+ cut '-d ' -f2
+ xargs kill -9
+ grep L3LikeQueueManager
+ ps -efww
Killed
[/CODE]
curious that y CHKQ is not called for the 2nd time
You kill yourself since L3LikeQueueManager is in your scripts arguments as well. But a while loop would be better then having the two functions call each other and potentially filling up the stack.