Re: BUG #12072: init script creates pid file with wrong owner

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #12072: init script creates pid file with wrong owner
Дата
Msg-id 11031.1417448475@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #12072: init script creates pid file with wrong owner  (Henrik Størner <henrik@hswn.dk>)
Ответы Re: BUG #12072: init script creates pid file with wrong owner
Список pgsql-bugs
Henrik Størner <henrik@hswn.dk> writes:
> The problem is with the init script installed from the rpm package. From
> line 161 it performs the server start by doing

>         echo -n "$PSQL_START"
>         $SU -l postgres -c "$PGENGINE/postmaster -p '$PGPORT' -D
> '$PGDATA' ${PGOPTS} &" >> "$PGLOG" 2>&1 < /dev/null
>         sleep 2
>         pid=`head -n 1 "$PGDATA/postmaster.pid" 2>/dev/null`
>         if [ "x$pid" != x ]
>         then
>                 success "$PSQL_START"
>                 touch "$lockfile"
> *                echo $pid > "$pidfile"*
>                 echo
>         else
>                 failure "$PSQL_START"
>                 echo
>                 script_result=1
>         fi

> Note the
>    echo $pid > "$pidfile"

> This creates a pid-file owned by root.

Why is the init script creating such a file at all?  Surely it should be
depending on the one created by the postmaster.  However, if there is a
reason to create a separate pidfile, I don't see the problem particularly:
the postmaster will neither create nor remove it, so it hardly matters
what the ownership is.
        regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Henrik Størner
Дата:
Сообщение: Re: BUG #12072: init script creates pid file with wrong owner
Следующее
От: Henrik Størner
Дата:
Сообщение: Re: BUG #12072: init script creates pid file with wrong owner