Re: [Sqlrelay-discussion] Forked listener removes unix socket file (patch available)
Brought to you by:
mused
From: Renat S. <sr...@st...> - 2011-11-11 05:07:51
|
Yes, it might be a better solution. Yet, calling destructors and manipulating semaphores and shared memory in signal handler is not recommended at all. The best way to handle a signal is to fire some flag in the handler and then check it in the main program flow. 11.11.2011 02:39, David Muse пишет: > Ahhh, I see the problem... > > I think a cleaner solution might be to remove the setting of pidfile to > NULL after the fork() and just wrap the removal of the pid and unixport > files with an "if (!isforkedchild) {" in the destructor. Then the > semset, idmemory and cmdl objects would still be freed. > > What do you think? > > Dave -- Renat Sabitov e-mail: sr...@st... Stack Soft jid: sr...@ja... |