Hi, On 2022-03-04 09:57:35 -0800, Andres Freund wrote: > On 2022-03-04 09:46:44 -0800, Andres Freund wrote: > > On 2022-03-04 09:30:37 -0800, Andres Freund wrote: > > > I wonder if we're missing some steps, at least on windows, to make pg_ctl > > > start independent of the starting shell? > > > > Sure looks that way. On windows, if I do pg_ctl start, then hit ctrl-c, the > > server shuts down. > > Short term the easiest fix might be to start postgres for those tests as a > service. But it seems we should fix whatever the cause of that > terminal-connectedness behaviour is. > > I'm out for ~2-3h. I started a test run with using a service just now: > https://cirrus-ci.com/task/5519573792325632 but I very well might have typoed > something...
Seems to have worked for the first few tests at least. Unless somebody wants to clean up that commit and push it, I'll do so once I'm back. Perhaps pg_ctl needs to call FreeConsole() or such? https://docs.microsoft.com/en-us/windows/console/closing-a-console Or perhaps pg_ctl ought to pass CREATE_NEW_PROCESS_GROUP to CreateProcess()? The lack of a process group would explain why we're getting signalled on ctrl-c... Greetings, Andres Freund