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.