From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | "John DeSoi" <desoi(at)pgedit(dot)com> |
Cc: | "Doug McNaught" <doug(at)mcnaught(dot)org>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Subject: | Re: sigint psql |
Date: | 2005-02-21 22:07:10 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCE47693C@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>> 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.
Take a look at GenerateConsoleCtrlEvent(). It can generate a fake
Ctrl-C. You'll need to figure out a console group etc, and I can't say
I've tested it, but it looks like a possible.
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2005-02-21 22:35:09 | Re: Design notes for BufMgrLock rewrite |
Previous Message | Bruce Momjian | 2005-02-21 21:32:21 | Re: sigint psql |