summaryrefslogtreecommitdiffstats
path: root/stap-start-server
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-08-26 10:46:50 -0400
committerDave Brolley <brolley@redhat.com>2009-08-26 10:46:50 -0400
commit03914a0194db3fd98f60c3f8604701f0c6536d7a (patch)
tree31b7bd22c19f8af5f9f2311165814c3056ec5eec /stap-start-server
parent3fe7d888f9383e24803738aa822c1bd207a7ae99 (diff)
downloadsystemtap-steved-03914a0194db3fd98f60c3f8604701f0c6536d7a.tar.gz
systemtap-steved-03914a0194db3fd98f60c3f8604701f0c6536d7a.tar.xz
systemtap-steved-03914a0194db3fd98f60c3f8604701f0c6536d7a.zip
Allow 20 seconds for the server to start up.
Use ps -e to check for server and avahi pids.
Diffstat (limited to 'stap-start-server')
-rwxr-xr-xstap-start-server7
1 files changed, 4 insertions, 3 deletions
diff --git a/stap-start-server b/stap-start-server
index 6471db96..ac31d3bd 100755
--- a/stap-start-server
+++ b/stap-start-server
@@ -14,22 +14,23 @@
# Initialize the environment
. `dirname $0`/stap-env
+startup_timeout=20
# start the server
${stap_exec_prefix}stap-serverd "$@" </dev/null >/dev/null 2>&1 &
server_pid=$!
# Make sure the server is started
-for ((attempt=0; $attempt < 10; ++attempt))
+for ((attempt=0; $attempt < $startup_timeout; ++attempt))
do
# Has the server started?
- if ! (ps -a | grep $server_pid) >/dev/null 2>&1; then
+ if ! (ps -e | grep $server_pid) >/dev/null 2>&1; then
sleep 1
continue
fi
# Is avahi advertizing the server?
- if ! (ps -fa | grep avahi-publish-service | grep $server_pid) > /dev/null 2>&1; then
+ if ! (ps -fe | grep avahi-publish-service | grep $server_pid) > /dev/null 2>&1; then
sleep 1
continue
fi