palaniyappanBala / klish

Automatically exported from code.google.com/p/klish
Other
0 stars 0 forks source link

Patch for /trunk/bin/konfd.c #117

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

The socket's filesystem entry needs to be unlink()'ed on konfd shutdown to 
avoid getting EADDRINUSE on server restart. However, this cannot always be done 
(i.e.: a crash or power outage)

Original issue reported on code.google.com by seyr...@gmail.com on 7 May 2012 at 3:18

GoogleCodeExporter commented 8 years ago
It can be done before bind(...) in main()

Original comment by seyr...@gmail.com on 7 May 2012 at 3:23

GoogleCodeExporter commented 8 years ago
Some time ago konfd have had unlink() before bind(). But it was a problem. You 
can start a several konfd daemons. The new one will overwrite the filesystem 
entry and previous entry will be lost. Some klish are already connected to 
first one and new klishes will connect to what konfd?

The such problems must be resolved using start/stop scripts, analysing pidfile.

Original comment by serj.kalichev@gmail.com on 10 May 2012 at 7:30