Re: [HACKERS] psql and Control-C
От | Peter Eisentraut |
---|---|
Тема | Re: [HACKERS] psql and Control-C |
Дата | |
Msg-id | Pine.LNX.4.21.0002191424230.474-100000@localhost.localdomain обсуждение исходный текст |
Ответ на | Re: [HACKERS] psql and Control-C (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [HACKERS] psql and Control-C
|
Список | pgsql-hackers |
On 2000-02-18, Tom Lane mentioned: > > Readline has an official way to preempt is, namely setting rl_done to > > non-zero. I can take a look how it copes with a longjmp from a signal > > handler, but I wouldn't set my hopes too high. > > Oh? Maybe we don't *need* a longjmp: maybe the signal handler just > needs to do either send-a-cancel or set-rl_done depending on the > current state of a flag that's set by the main line code. I tried that but it doesn't work. On further thought I believe that the purpose of rl_done is for readline extensions, so that, for example, a semicolon handler can scan the current line and then immediately return as if you had pressed enter. When idle, readline hangs on read(), so setting some variable isn't going to interrupt that. The longjmp seems to work but I need to test it more. I'm concerned how it will work across platforms, esp. Windows (being a POSIX thing). Should there be a configure test or can I assume it on every non-WIN32 system? -- Peter Eisentraut Sernanders väg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
В списке pgsql-hackers по дате отправления: