Re: PostgreSQL in Windows console and Ctrl-C - Mailing list pgsql-hackers

From Christian Ullrich
Subject Re: PostgreSQL in Windows console and Ctrl-C
Date
Msg-id 4dc33c745cfa4faaae02f39ce084f601@AMSPR06MB134.eurprd06.prod.outlook.com
Whole thread Raw
In response to Re: PostgreSQL in Windows console and Ctrl-C  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
* From: Bruce Momjian

> On Mon, Apr 14, 2014 at 09:34:14AM +0530, Amit Kapila wrote:
> > The problem can be solved this way, but the only question here is
> > whether it is acceptable for users to have a new console window for
> > server.
> >
> > Can others also please share their opinion if this fix (start server
> > in new console) seems acceptable or shall we try by passing some
> > information from pg_ctl and then ignore CTRL+C && CTRL+BREAK for it?
>
> I wanted to point out that I think this patch is only appropriate for
> head, not backpatching.  Also, on Unix we have to handle signals that

Yes, of course.

> come from the kill command.  Can you send CTRL+C from other applications
> on Windows?

Yes again, using GenerateConsoleCtrlEvent() you can send these events to
any (console-attached) process you have the required permissions for,
but that is not an issue for the same reason it isn't one on Unix. All
the target process sees is the event, it cannot determine (nor does it
care) where the event came from.

--
Christian




pgsql-hackers by date:

Previous
From: Christian Ullrich
Date:
Subject: Re: PostgreSQL in Windows console and Ctrl-C
Next
From: Christian Ullrich
Date:
Subject: Re: PostgreSQL in Windows console and Ctrl-C