3 # Copyright 2013 Samsung Electronics Co., Ltd
5 # Licensed under the Flora License, Version 1.1 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://floralicense.org/license/
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 while [ ! -f "/tmp/.stop.provider" ]; do
22 # PROVIDER_HEAP_MONITOR_START=false
23 # PROVIDER_DISABLE_CALL_OPTION=false
24 # PROVIDER_METHOD="shm", "pixmap", "file" (default = "file")
25 BUFMGR_LOCK_TYPE="once" BUFMGR_MAP_CACHE="true" /usr/bin/data-provider-master
26 vconftool set -t bool memory/data-provider-master/started 0 -f
27 let RETRY_COUNT=$RETRY_COUNT+1
28 if [ $RETRY_COUNT -gt 5 ]; then
29 echo "EXCEED THE MAXIMUM RETRY COUNT: $RETRY_COUNT (max 5)"
33 rm /tmp/.stop.provider
38 OLDPID=`ps ax | grep /usr/bin/data-provider-master | grep -v grep | awk '{print $1}'`
39 if [ x"$OLDPID" != x"" ]; then
40 echo $OLDPID is already running.
44 rm /tmp/.stop.provider
52 echo "'ps' is not exists"
58 echo "'grep' is not exists"
64 echo "'awk' is not exists"
68 if [ ! -f "/usr/bin/data-provider-master" ]; then
69 echo "Data provider master is not installed correctly";
73 touch /tmp/.stop.provider
74 BIN_INODE=`stat -Lc "%i" /usr/bin/data-provider-master`
76 PID=`ps ax | grep 'data-provider-master' | awk '{print $1}'`
79 if [ ! -f "/proc/$I/exe" ]; then
83 INODE=`stat -Lc "%i" /proc/$I/exe 2>/dev/null`
84 if [ x"$BIN_INODE" == x"$INODE" ]; then
85 echo "Send TERM to $I"
86 kill $I # Try to terminate a master which is launched already
95 restart) stop; start;;