Re: Cleaning up historical portability baggage
От | Thomas Munro |
---|---|
Тема | Re: Cleaning up historical portability baggage |
Дата | |
Msg-id | CA+hUKGKdmC4A7cJNNSmY6KTfUsnX0b2AnjJu52Wd3_uHO1bBpg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Cleaning up historical portability baggage (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: Cleaning up historical portability baggage
|
Список | pgsql-hackers |
On Sat, Aug 6, 2022 at 2:54 AM Robert Haas <robertmhaas@gmail.com> wrote: > On Fri, Aug 5, 2022 at 10:48 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Hmm ... I agree with you that the end result could be nicer code, > > but what's making it nicer is a pretty substantial amount of human > > effort for each and every call site. Is anybody stepping forward > > to put in that amount of work? > > > > My proposal is to leave the call sites alone until someone feels > > like doing that sort of detail work. > > My plan was to nerd-snipe Thomas Munro into doing it.[1] Alright, well here's a patch for the setsid() stuff following Robert's plan, which I think is a pretty good plan. Did I understand correctly that the places that do kill(-pid) followed by kill(pid) really only need the kill(-pid)? I checked that user processes should never have pid 0 (that's a special system idle process) or 1 (because they're always even, actually it looks like they're pointers in kernel space or something like that), since those wouldn't play nice with the coding I used here. I note that Windows actually *does* have process groups (in one of the CI threads, we learned that there were at least two concepts like that). Some of our fake signals turn into messages to pipes, and others turn into process termination, and in theory we could probably also take advantage of Windows' support for its native "control C" and "control break" signals here. It's possible that someone could do something to make all but the pipe ones propagate to real Windows process groups. That might be good for things like nuking archiver subprocesses and the like when taking out the backend, or something like that, but I'm not planning to look into that myself.
Вложения
В списке pgsql-hackers по дате отправления: