Re: sigint psql

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Doug McNaught" <doug(at)mcnaught(dot)org>
Cc: "John DeSoi" <desoi(at)pgedit(dot)com>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: sigint psql
Date: 2005-02-21 20:00:23
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE476939@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>> > I'm communicating with psql via a pipe stream. This works
>pretty well,
>> > but one problem I have is trying to cancel an operation.
>If I send a
>> > sigint, psql dies. In looking at the source I gather this
>is because
>> > it assumes I'm in non-interactive mode (pset.notty is true). I was
>> > wondering if there was some way to work around this short of
>> > recompiling the source. I need to do the same thing on Windows.
>> >
>> > Thanks for any suggestions,
>>
>> On Unix you could run 'psql' through a pty rather than a pipe. No
>> idea what the Windows equivalent would be.
>
>We don't have signals on win32 like we have on Unix so we
>simulate them.
>Not sure it is possible to signal psql like you want on Win32.

There is no way so signal *psql*, as in the client side process. The
signal emulation only runs in the server.

You can do the same thing in the server using pg_ctl kill, but that
won't work on client processes.

//Magnus

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John DeSoi 2005-02-21 21:09:20 Re: sigint psql
Previous Message Magnus Hagander 2005-02-21 19:56:57 Re: BUG #1466: syslogger issues