diff options
| author | Tatsuo Ishii | 2021-02-02 14:12:37 +0000 |
|---|---|---|
| committer | Tatsuo Ishii | 2021-02-02 14:20:04 +0000 |
| commit | 6d6baf7b13bd112dd09cbc53629bb6d911e8b580 (patch) | |
| tree | 52fab21846ec2c787a39aba43a9eaa0bc2d08e6c | |
| parent | 88f11a0930136176779d8f9a0938497d0f37bae7 (diff) | |
Enhance pgpool_setup.V3_5_STABLE
"shutdownall" script unconditionally waited for the pgpool.pid file is
gone after "pgpool stop". But if invalid pgpool.pid file exists, it
waits forever. To avoid this check the exit status of "pgpool stop"
and only wait if the exit status is 0.
| -rwxr-xr-x | src/test/pgpool_setup | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/pgpool_setup b/src/test/pgpool_setup index 7b1885a22..df7420080 100755 --- a/src/test/pgpool_setup +++ b/src/test/pgpool_setup @@ -724,8 +724,7 @@ echo "PGPOOL_INSTALL_DIR=$PGPOOL_INSTALL_DIR" >> $STARTALL chmod 755 $STARTALL echo 'dir=`pwd`' > $SHUTDOWNALL echo "PGPOOL_INSTALL_DIR=$PGPOOL_INSTALL_DIR" >> $SHUTDOWNALL -echo '$PGPOOL_INSTALL_DIR/bin/pgpool -f $dir/etc/pgpool.conf -m f stop' >> $SHUTDOWNALL -echo 'while [ -f $dir/run/pgpool.pid ];do sleep 1;done' >> $SHUTDOWNALL +echo '$PGPOOL_INSTALL_DIR/bin/pgpool -f $dir/etc/pgpool.conf -m f stop && while [ -f $dir/run/pgpool.pid ];do sleep 1;done' >> $SHUTDOWNALL if [ $CHECK_TIME_WAIT != "false" ];then echo "while netstat -a|grep $ORIGBASEPORT ;do sleep 1;done" >> $SHUTDOWNALL fi |
