On Sun, Nov 17, 2019 at 10:54:08AM +0000, William Dauchy wrote: > Yes, there are different cases; I was able to reproduce it only with the > mworker mode (-W or -Ws); indeed we currently do setuid in this order: > -> global.mode & (MODE_MWORKER|MODE_DAEMON) > -> setuid/setgid > -> set dumpable > but after there is also: > -> global.mode & (MODE_DAEMON | MODE_MWORKER | MODE_MWORKER_WAIT) > -> setuid/setgid > -> this is where I added a the new set dumpable
I think I didn't notice this location. > After re reading this, maybe I could simplify the code and mutualise > some code to make it clearer. Thus probably we should move it to the second place only if it's supposed to catch all of them ? Or even just before the polling loop. Oh now I think I remember why it was set early. I expected to catch some early crashes (e.g. during config processing). With some more background on this now, I'd think that we don't care much about this because this is extremely rare and easier to reproduce at will if needed. So indeed, those we're really interested in are the runtime crashes thus setting this the latest possible likely makes much more sense. Willy