Re: Remove unnecessary code from psql's watch command

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Remove unnecessary code from psql's watch command
Дата
Msg-id Zeemk0eJoucp4zVx@paquier.xyz
обсуждение исходный текст
Ответ на Remove unnecessary code from psql's watch command  (Yugo NAGATA <nagata@sraoss.co.jp>)
Ответы Re: Remove unnecessary code from psql's watch command  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Mar 05, 2024 at 10:05:52PM +0900, Yugo NAGATA wrote:
> In the current code of do_watch(), sigsetjmp is called if WIN32
> is defined, but siglongjmp is not called in the signal handler
> in this condition. On Windows, currently, cancellation is checked
> only by cancel_pressed, and  calling sigsetjmp in do_watch() is
> unnecessary. Therefore, we can remove code around sigsetjmp in
> do_watch(). I've attached the patch for this fix.

Re-reading the top comment of sigint_interrupt_enabled, it looks like
you're right here.  As long as we check for cancel_pressed there
should be no need for any special cancellation handling here.
--
Michael

Вложения

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

Предыдущее
От: "Tristan Partin"
Дата:
Сообщение: Re: Refactoring backend fork+exec code
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: pg_upgrade --copy-file-range