Re: In MacOS, psql reacts on SIGINT in a strange fashion (Linux is fine) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: In MacOS, psql reacts on SIGINT in a strange fashion (Linux is fine)
Date
Msg-id 62348.1713020033@sss.pgh.pa.us
Whole thread Raw
In response to [MASSMAIL]In MacOS, psql reacts on SIGINT in a strange fashion (Linux is fine)  (Dmitry Koterov <dmitry.koterov@gmail.com>)
Responses Re: In MacOS, psql reacts on SIGINT in a strange fashion (Linux is fine)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Why is parula failing?
Next
From: Dmitry Dolgov
Date:
Subject: [MASSMAIL]Identify huge pages accessibility using madvise