summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorBiswajit Sadhu <sadhub@vmware.com>2018-09-06 02:51:40 -0700
committerBiswajit Sadhu <sadhub@vmware.com>2018-09-06 02:51:40 -0700
commit6e23e5e9e16fb16aafb4ef05ceb3514a02147a21 (patch)
tree7c38b58a1da5aaff453599d55d05747cb3199437 /lib/if.c
parent3bf513a5975848bc9ff9dbc5529d8c43a88b8d60 (diff)
lib: Ensure FRR detects running of the second instance of a FRR daemon, doesnot allow it to run.
Solution : The following procedures would be performed : 1. Verify if the pid file for each daemon is present or not. If the file is not present, that means the daemon is getting instantiated for the first time. So let it go ahead. If the file is present proceed to point ‘2’. 2. Try fetching the properties of the pid file. 3. If it has RW lock, that means one instance of this the daemon is already running. So stop moving ahead and do exit() else let it go ahead.
Please note all above procedure happen at the initial state of daemon’s instantiation, much before it starts any session with other process/allocates resources etc.. and this verification do not have any impact of any operations done later, if the verification succeeds. Signed-off-by: bisdhdh sadhub@vmware.com
Diffstat (limited to 'lib/if.c')
0 files changed, 0 insertions, 0 deletions