Hi Dejan,

> If you drop 2>&1 this won't be silent status any more :)
> 
> So, I would like to understand what are your circumstances, i.e.
> why does this bother you so much that you want it included "by
> all means".

I forgot an original purpose.
The revision of ProcessRunning withdraws it.

-----------------------------------------------------------------------
--- a/heartbeat/apache  Thu Nov 12 13:26:59 2009 +0900
+++ b/heartbeat/apache  Mon Nov 16 10:18:46 2009 +0900
@@ -342,7 +342,7 @@
         [ $tries -lt 10 ]
       do
         sleep 1
-        kill $ApachePID >/dev/null 2>&1
+        kill $ApachePID >/dev/null 
         ocf_log info "Killing apache PID $ApachePID"
         tries=`expr $tries + 1`
       done
@@ -362,8 +362,8 @@
   fi
 
   for sig in SIGTERM SIGHUP SIGKILL ; do
-    if pgrep -f $HTTPD.*$CONFIGFILE >/dev/null 2>&1 ; then
-      pkill -$sig  -f $HTTPD.*$CONFIGFILE >/dev/null 2>&1
+    if pgrep -f $HTTPD.*$CONFIGFILE >/dev/null ; then
+      pkill -$sig  -f $HTTPD.*$CONFIGFILE >/dev/null
       ocf_log info "apache children were signalled ($sig)"
       sleep 1
     else

-----------------------------------------------------------------------

Best Regards,
Hideo Yamauchi.


--- Dejan Muhamedagic <[email protected]> wrote:

> Hi Hideo-san,
> 
> On Thu, Nov 12, 2009 at 01:42:21PM +0900, [email protected] wrote:
> > Hi,
> > 
> > We review the output of the error log of RA.
> > 
> > In RA of apace, the error of the kill command is canceled somehow or other.
> 
> Right. That is common practice, since there's typically not
> anything interesting in the output of the kill command (either
> process doesn't exist or permission denied).
> 
> > I made a patch to output it without canceling the failure of the kill 
> > command.
> > 
> > It is a small patch, but wants you to include it in the latest
> > edition by all means.
> 
> Let me quote part of the code:
> 
> silent_status() {
>   if
>     [ -f $PidFile  ] 
>   then
>     ProcessRunning `cat $PidFile`
>       ...
> 
> ProcessRunning() {
>     ...
>       #  This assumes we're running as root...
>       kill -0 "$ApachePID" >/dev/null 2>&1
> 
> If you drop 2>&1 this won't be silent status any more :)
> 
> So, I would like to understand what are your circumstances, i.e.
> why does this bother you so much that you want it included "by
> all means".
> 
> Cheers,
> 
> Dejan
> 
> > 
> > Best Regards,
> > Hideo Yamauchi.
> 
> 
> > _______________________________________________________
> > Linux-HA-Dev: [email protected]
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> > Home Page: http://linux-ha.org/
> 
> _______________________________________________________
> Linux-HA-Dev: [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
> 

_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to