From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | mark(at)mark(dot)mielke(dot)cc |
Cc: | Kevin Brown <kevin(at)sysexperts(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Question about Ctrl-C and less |
Date: | 2005-10-21 13:40:43 |
Message-ID: | 20051021134038.GC29418@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 21, 2005 at 08:48:31AM -0400, mark(at)mark(dot)mielke(dot)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(at)svana(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2005-10-21 13:44:23 | Re: collector/autovacuum after crash (8.1beta3) |
Previous Message | Kevin Grittner | 2005-10-21 13:40:26 | Re: [GENERAL] 'a' == 'a ' |