You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cu...@apache.org on 2006/07/12 13:49:44 UTC
svn commit: r421248 - /lucene/hadoop/trunk/bin/hadoop-daemon.sh
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