Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> We talked about adding a flag to postmaster, to tell it to call
> setsid(). But I'm not sure what would be the appropriate time to do it.
Yeah, there's no ideal time in the postmaster.
> Another idea would be to call setsid() in pg_ctl, after forking
> postmaster, like in Paul's original patch. That solves 1. and 2. To
> still do 3., add a signal handler for SIGINT in pg_ctl, which forwards
> the SIGINT to the postmaster process. Thoughts on that?
That seems like a nice idea.
regards, tom lane