Commit 3bd7ce94 authored by Federico Vaga's avatar Federico Vaga

sw:lib: bugfix close also sync FD

the fd_hmq_sync file descriptor was never closed, which is not a problem when
also the process that how the FD dies, but it is a problem when the process
does ``trtl_close()`` and then ``trtl_open()`` again many times.
Reported-by: Dimitris Lampridis's avatarDimitris Lampridis <dimitris.lampridis@cern.ch>
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 1bcbe6a6
......@@ -350,6 +350,8 @@ void trtl_close(struct trtl_dev *trtl)
for (k = 0; k < wdesc->cfgrom.n_hmq[i]; ++k) {
if (wdesc->fd_hmq[i][k] >= 0)
close(wdesc->fd_hmq[i][k]);
if (wdesc->fd_hmq_sync[i][k] >= 0)
close(wdesc->fd_hmq_sync[i][k]);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment