Skip site navigation (1) Skip section navigation (2)

Re: pg_ctl restart bug

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, jmitchell(at)greatbridge(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_ctl restart bug
Date: 2001-04-20 21:36:08
Message-ID: 200104202136.f3KLa8I24843@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
I can assure you that $@ is never the way to go, always use "$@".  Not
sure about the second change.

> pg_ctl restart works fine with this patch, but I'm not sure whether it
> breaks useful cases for the other paths:
> 
> ***************
> *** 323,335 ****
>   	    shift
>               po_path=$1
>               shift
> ! 	    POSTOPTS=$@
>   	fi
>       else # -o given
>           POSTOPTS="-D $PGDATA $POSTOPTS"
>       fi
>   
> !     eval '$po_path' '$POSTOPTS' $logopt '&'
>   
>       # if had an old lockfile, check to see if we were able to start
>       if [ -n "$oldpid" ];then
> --- 323,335 ----
>   	    shift
>               po_path=$1
>               shift
> ! 	    POSTOPTS="$@"
>   	fi
>       else # -o given
>           POSTOPTS="-D $PGDATA $POSTOPTS"
>       fi
>   
> !     eval '$po_path' $POSTOPTS $logopt '&'
>   
>       # if had an old lockfile, check to see if we were able to start
>       if [ -n "$oldpid" ];then
> 
> 
> 
> 			regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

pgsql-bugs by date

Next:From: Peter EisentrautDate: 2001-04-20 22:16:43
Subject: Re: pg_ctl restart bug
Previous:From: Bruce MomjianDate: 2001-04-20 21:33:43
Subject: Re: pg_ctl restart bug

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group