add logic for master to write a pidfile#40
Conversation
src/bud.c
Outdated
|
Thank you very much for your contribution! Could you please fix some nits? |
|
definitely... i'll make the changes! one question though: I was originally going to use open/write/close instead of fopen/fprintf/fclose, but I see based on the source code either way, I much prefer just using the syscalls directly... it's easier and simpler. |
|
Hm... I just thought that we could try using synchronous Also, is it happening in a right place right now? From what I see it seems that the |
|
I agree, the As far as I can tell, only the master will write the pid because of this check if (!config->is_worker && config->pidfile != NULL) {
// make pid file
} |
|
Ah, I see... Why not move this code to |
notes
I tried to place the logic in
bud.cright above the call touv_runbut the ended up confused as to why there are 2 calls touv_run... either way i've tested this and it seems to work as expected.