hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r421248 - /lucene/hadoop/trunk/bin/hadoop-daemon.sh
Date Wed, 12 Jul 2006 11:49:44 GMT
Author: cutting
Date: Wed Jul 12 04:49:44 2006
New Revision: 421248

URL: http://svn.apache.org/viewvc?rev=421248&view=rev
Log:
HADOOP-360.  Use 'kill -0' instead of 'ps -p' to check if process is
alive, for better compatibility with cygwin.  Contributed by Philippe
Gassmann.

Modified:
    lucene/hadoop/trunk/bin/hadoop-daemon.sh

Modified: lucene/hadoop/trunk/bin/hadoop-daemon.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/hadoop-daemon.sh?rev=421248&r1=421247&r2=421248&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/hadoop-daemon.sh (original)
+++ lucene/hadoop/trunk/bin/hadoop-daemon.sh Wed Jul 12 04:49:44 2006
@@ -72,7 +72,7 @@
   (start)
 
     if [ -f $pid ]; then
-      if ps -p `cat $pid` > /dev/null 2>&1; then
+      if kill -0 `cat $pid` > /dev/null 2>&1; then
         echo $command running as process `cat $pid`.  Stop it first.
         exit 1
       fi
@@ -92,7 +92,7 @@
   (stop)
 
     if [ -f $pid ]; then
-      if ps -p `cat $pid` > /dev/null 2>&1; then
+      if kill -0 `cat $pid` > /dev/null 2>&1; then
         echo stopping $command
         kill `cat $pid`
       else



Mime
View raw message