From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | John DeSoi <desoi(at)pgedit(dot)com> |
Cc: | Magnus Hagander <mha(at)sollentuna(dot)net>, Doug McNaught <doug(at)mcnaught(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: sigint psql |
Date: | 2005-02-21 21:32:21 |
Message-ID: | 200502212132.j1LLWLt07895@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
John DeSoi wrote:
> Hi Magnus,
>
> On Feb 21, 2005, at 3:00 PM, Magnus Hagander wrote:
>
> > There is no way so signal *psql*, as in the client side process. The
> > signal emulation only runs in the server.
> >
>
> But is there some equivalent of pressing ctrl-C to make psql stop what
> it is doing? For example, through the pipe stream I may execute a \i
> command and the user wants to stop before the file is processed. What
> mechanism is used to do this on win32? I thought it could be
> accomplished on Unix with kill -2, hence my original question. But
> maybe I'm looking in the wrong place.
Win32 doesn't have the granularity to do special signal numbers like we
do on Unix, so we have to map control-C to call a special libpq function
that communicates with the postmaster/backend to cancel the query. No
way an outside process can do that.
Your only solution would be to hack psql to accept a signal somehow to
call that libpq function, and hack your client to send that signal to
psql somehow.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2005-02-21 22:07:10 | Re: sigint psql |
Previous Message | John DeSoi | 2005-02-21 21:29:10 | Re: sigint psql |