Re: In MacOS, psql reacts on SIGINT in a strange fashion (Linux is fine)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: In MacOS, psql reacts on SIGINT in a strange fashion (Linux is fine)
Дата
Msg-id 62348.1713020033@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [MASSMAIL]In MacOS, psql reacts on SIGINT in a strange fashion (Linux is fine)  (Dmitry Koterov <dmitry.koterov@gmail.com>)
Ответы Re: In MacOS, psql reacts on SIGINT in a strange fashion (Linux is fine)  (Dmitry Koterov <dmitry.koterov@gmail.com>)
Список pgsql-hackers
Dmitry Koterov <dmitry.koterov@gmail.com> writes:
> I almost lost my mind today trying to figure out why sending a SIGINT
> precisely to a psql interactive process delivers this SIGINT not only to
> that psql, but also to its parents.

Let me guess ... you're using zsh not bash?

I do not use zsh myself, but what I read in its man page suggests
that this is its designed behavior.  The kill command says its
arguments are "jobs", and elsewhere it says

       There are several ways to refer to jobs in the shell.  A job can be
       referred to by the process ID of any process of the job or by one of
       the following: ...

so I suspect zsh is treating that stack of processes as a "job" and
zapping all of it.  There is certainly nothing in psql that would
attempt to signal its parent process (let alone grandparent).

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Why is parula failing?
Следующее
От: Dmitry Dolgov
Дата:
Сообщение: [MASSMAIL]Identify huge pages accessibility using madvise