Re: Question about Ctrl-C and less

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Question about Ctrl-C and less
Дата
Msg-id 20051021134038.GC29418@svana.org
обсуждение исходный текст
Ответ на Re: Question about Ctrl-C and less  (mark@mark.mielke.cc)
Список pgsql-hackers
On Fri, Oct 21, 2005 at 08:48:31AM -0400, mark@mark.mielke.cc wrote:
> Which other ones? I can't think of one. The ones that don't handle
> SIGINT, or that are not designed for this scenario certainly don't count -
> as that is how psql works right now without the patch. Of the remaining
> programs that are designed to work with an application such as less, which
> ones purposefully close the input stream to less, and continue running?

The one run into all the time is:

rgrep "something" . | less

If you do a search and it doesn't find anything, it'll keep reading in
data until it finds it or reaches the end. Hit Ctrl-C to abort the
search and you kill the rgrep too.

Now, arguably rgrep is not "designed to work with an application such
as less" so doesn't meet your criteria. So the argument is about
whether psql is. Is the pager an integral part of the output mechanism
of psql, or just a bolt-on like a shell pipe? I suspect you can argue
either way, which is why I'm trying to find a way to have it both ways.

> SIG_IGN is the easiest, and the most effective. Certainly the easiest
> to maintain, and the least intrusive to the core.

Yeah, but doesn't fix the memory leaks and other random leakage and
breakage from the longjmp(). But I'm getting there...

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 по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: [GENERAL] 'a' == 'a '
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: collector/autovacuum after crash (8.1beta3)