Re: Question about Ctrl-C and less

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Question about Ctrl-C and less
Дата
Msg-id 20051022101238.GB16589@svana.org
обсуждение исходный текст
Ответ на Re: Question about Ctrl-C and less  (Kevin Brown <kevin@sysexperts.com>)
Список pgsql-hackers
On Fri, Oct 21, 2005 at 05:28:49PM -0700, Kevin Brown wrote:
> When a pager is being used, we check for the flag immediately after
> doing a write()/fwrite() to the pipe.  If it's set, we pclose(), clear
> the flag, and then manually invoke the non-pager signal handler.
> SIGINT should cause the write() to return immediately, possibly with
> EINTR.

You wish. PostgreSQL uses BSD signal semantics, which means system
calls get restarted. Neither read nor write will return when user
presses Ctrl-C... Hence my question about POSIX signals...

It doesn't matter though, if write blocks there's no processing
happening anyway and we can check the flag after write returns success
(pager accepted more data) or failure (pager died).

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

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

Предыдущее
От: Paresh Bafna
Дата:
Сообщение: Nested/recursive query execution
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Nested/recursive query execution