Re: Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.)
От | Heikki Linnakangas |
---|---|
Тема | Re: Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.) |
Дата | |
Msg-id | 54D12CD2.2060100@vmware.com обсуждение исходный текст |
Ответ на | Re: Re: Overhauling our interrupt handling (was Escaping from blocked send() reprised.) (Andres Freund <andres@2ndquadrant.com>) |
Ответы |
Re: Re: Overhauling our interrupt handling (was Escaping
from blocked send() reprised.)
|
Список | pgsql-hackers |
On 02/03/2015 08:54 PM, Andres Freund wrote: > * Previously the patchset didn't handle SIGTERM while > InteractiveBackend() was reading from the client. It did handle > ctrl-c/d, but since getc() isn't interruptible and can't be replaced > with latches... The fix for that isn't super pretty: > die(): > if (DoingCommandRead && whereToSendOutput != DestRemote) > ProcessInterrupts(); > but imo acceptable for single user mode. That smells an awful lot like ImmediateInterruptOK. Could you use WaitLatchOrSocket to sleep on stdin? Probably needs to be renamed or copied to WaitLatchOrStdin(), or a new flag to be added to wait on stdin instead of a socket, at least on Windows, but in theory. Might not be worth it if it gets complicated - I can live with the above - but it's a thought. - Heikki
В списке pgsql-hackers по дате отправления: