mirror_frr/lib
Biswajit Sadhu 6e23e5e9e1 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
2018-09-06 02:51:40 -07:00
..
.gitignore *: globally ignore clippy-generated source 2018-03-09 17:52:15 -05:00
agentx.c *: rename zlog_fer -> flog_err 2018-08-14 20:02:05 +00:00
agg_table.c lib: Add Aggregate Table and Aggregate_node 2018-08-30 17:47:59 -04:00
agg_table.h lib: Move aggregate pointer into aggregate route/table 2018-08-30 17:47:59 -04:00
bfd.c bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
bfd.h bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
bitfield.h *: reindent 2017-07-17 14:04:07 +02:00
buffer.c lib: Remove zlog_warn from some places in buffer.c 2018-08-23 08:36:07 -04:00
buffer.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
checksum.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
checksum.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
clippy.c lib: untrusted argument (Coverity 1448386) 2018-06-27 15:50:04 +02:00
clippy.h lib: clippy the assistant 2017-06-14 19:29:23 +02:00
command_graph.c lib: fix clippy build w/ gcc under certain configs 2018-04-26 12:31:45 -04:00
command_graph.h lib: add ability to dump cli mode graph 2018-04-22 17:14:55 -04:00
command_lex.l lib: ignore cli lexer in clang-analyze 2018-04-13 17:17:42 -04:00
command_match.c lib: null check (2) (Coverity 1451361) 2018-06-27 15:24:45 +02:00
command_match.h *: reindent 2017-07-17 14:04:07 +02:00
command_parse.y lib: Convert zlog_err for clippy build 2018-08-14 20:02:05 +00:00
command_py.c lib: Fix small memory leak when using command_py.c 2017-10-17 09:22:41 -04:00
command.c *: rename ferr_zlog -> flog_err_sys 2018-08-14 20:02:05 +00:00
command.h Merge branch 'master' into bfd-final 2018-08-14 08:16:10 -04:00
compiler.h build: wrap "fallthrough" attr 2018-08-21 20:34:58 +02:00
csv.c babeld, lib, ospfd, tests: fmt fixes (cppcheck) 2018-06-18 17:52:56 +02:00
csv.h *: reindent 2017-07-17 14:04:07 +02:00
debug.c lib: add mt-safe debugging facilities 2018-03-01 15:01:25 -05:00
debug.h lib: add convenience debugging macros 2018-03-12 11:17:02 -04:00
defun_lex.l lib: implement DEFPY_NOSH 2018-08-13 18:59:31 -03:00
distribute.c *: reindent 2017-07-17 14:04:07 +02:00
distribute.h *: reindent 2017-07-17 14:04:07 +02:00
event_counter.c *: reindent 2017-07-17 14:04:07 +02:00
event_counter.h *: reindent 2017-07-17 14:04:07 +02:00
ferr.c lib: Use the actual string we want to limit '===' line to 2018-08-28 14:36:44 -04:00
ferr.h *: rename ferr_ref -> log_ref 2018-08-14 20:02:05 +00:00
fifo.h *: reindent 2017-07-17 14:04:07 +02:00
filter.c libs, daemons: use const in route-map apply 2018-07-23 10:34:35 -04:00
filter.h libs, daemons: use const in route-map apply 2018-07-23 10:34:35 -04:00
freebsd-queue.h *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
frr_pthread.c lib: fix use of frrpthread os_name 2018-08-30 11:44:45 -04:00
frr_pthread.h *: pthread set name abstraction 2018-08-29 15:41:54 -07:00
frr_zmq.c *: rename zlog_fer -> flog_err 2018-08-14 20:02:05 +00:00
frr_zmq.h lib: Address ZMQ lib TODOs 2017-11-23 12:50:27 +01:00
frratomic.h libs: fix missing atomics for some gcc versions 2018-08-29 15:39:19 -04:00
frrstr.c Merge pull request #2495 from pacovn/fixme_all_digit 2018-06-20 07:38:19 -04:00
frrstr.h bgpd, lib, ospfd, zebra: all_digit moved to frrstr 2018-06-19 17:59:53 +02:00
getopt1.c *: reindent 2017-07-17 14:04:07 +02:00
getopt.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
getopt.h *: reindent 2017-07-17 14:04:07 +02:00
gitversion.pl build: make gitversion more useful 2017-08-02 02:59:51 +02:00
grammar_sandbox_main.c lib/bgpd: provide/use API to get hostname/domainname 2017-08-24 16:37:16 -07:00
grammar_sandbox.c lib: add ability to dump cli mode graph 2018-04-22 17:14:55 -04:00
graph.c lib: add vector_remove() to vector.[ch] 2018-06-06 16:16:12 +00:00
graph.h lib: add DFS + DOT dumping to graph datastructure 2018-04-22 17:14:55 -04:00
hash.c Revert "lib: A small optimization for the hash iterate and walk functions" 2018-07-06 10:18:11 -04:00
hash.h lib: Update hash.h documentation 2018-08-15 17:53:09 -04:00
hook.c *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
hook.h *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
if_rmap.c *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
if_rmap.h *: reindent 2017-07-17 14:04:07 +02:00
if.c zebra: if multiple connecteds, select loopback or vrf if present 2018-08-23 18:49:48 +00:00
if.h zebra: if multiple connecteds, select loopback or vrf if present 2018-08-23 18:49:48 +00:00
imsg-buffer.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
imsg.c bgpd isisd ldpd lib ospfd pimd: redundancy (infer) 2018-06-20 22:25:28 +02:00
imsg.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
ipaddr.h zebra: remote RMAC for EVPN ipv6 hosts should be programmed against the ipv4 nexthop 2018-05-08 19:24:15 -04:00
jhash.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
jhash.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
json.c bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
json.h bgpd/ospfd: make bgp and ospf json response a bit more consistent 2018-08-30 12:40:18 +00:00
keychain.c ripd: null check key 2018-08-01 20:48:36 +08:00
keychain.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
lib_errors.c *: rename ferr_ref -> log_ref 2018-08-14 20:02:05 +00:00
lib_errors.h *: rename ferr_ref -> log_ref 2018-08-14 20:02:05 +00:00
libfrr.c lib: Ensure FRR detects running of the second instance of a FRR daemon, doesnot allow it to run. 2018-09-06 02:51:40 -07:00
libfrr.h lib: Add --log-level to daemons 2018-06-19 09:02:21 -04:00
libospf.h ospf: Fix segfault if compiled with DEBUG 2017-08-09 12:07:58 +02:00
linklist.c lib: add listnode_add_head() 2018-08-13 18:59:31 -03:00
linklist.h lib: add listnode_add_head() 2018-08-13 18:59:31 -03:00
log_int.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
log.c doc, lib, zebra: Remove deprecated encode and decode functionality 2018-08-24 10:56:15 -04:00
log.h lib: error codes are uint32_t's 2018-08-22 17:45:47 +00:00
logicalrouter.c *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
logicalrouter.h lib: split logicalrouter and vrf netns feature 2018-02-27 11:11:24 +01:00
Makefile build: convert lib/ to non-recursive build 2017-07-31 23:03:27 +02:00
md5.c *: Remove cvs control points 2017-12-05 17:28:12 -05:00
md5.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
memory_vty.c lib: qmem show changes (header and max) 2018-08-28 19:22:30 -04:00
memory_vty.h *: reindent 2017-07-17 14:04:07 +02:00
memory.c lib: atomic_add_fetch_explicit not supported on all platforms 2018-08-28 19:22:37 -04:00
memory.h lib: qmem show changes (header and max) 2018-08-28 19:22:30 -04:00
module.c eigrpd lib pimd zebra: dead code (PVS-Studio) 2018-07-06 01:10:15 +02:00
module.h *: reindent 2017-07-17 14:04:07 +02:00
monotime.h *: Define the number of seconds in a Day, Week and year 2017-08-08 09:06:22 -04:00
mpls.c lib, zebra: Move label conversion strings to lib 2018-04-18 07:06:11 -04:00
mpls.h zebra, lib: error references for zebra 2018-08-14 20:02:05 +00:00
netns_linux.c lib: remove spurious message when netns is not available 2018-08-29 09:27:17 +02:00
netns_other.c zebra: add an indirection table for ns_id 2018-04-13 16:40:32 +02:00
network.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
network.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
nexthop_group.c lib: Fix SA warning 2018-04-23 22:09:33 -04:00
nexthop_group.h libs: add ALL_NEXTHOPS_PTR iterator macro 2018-07-10 14:07:43 -04:00
nexthop.c lib: Add hash and use const a bit more intelligently 2018-04-06 13:22:43 -04:00
nexthop.h lib: Add hash and use const a bit more intelligently 2018-04-06 13:22:43 -04:00
ns.h lib: rename parameter for netns function 2018-04-13 16:40:32 +02:00
openbsd-queue.h *: reindent 2017-07-17 14:04:07 +02:00
openbsd-tree.c *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
openbsd-tree.h *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
pbr.h bgpd: add an icmp flag for flowspec icmp entries 2018-06-28 11:08:59 +02:00
pid_output.c *: rename ferr_zlog -> flog_err_sys 2018-08-14 20:02:05 +00:00
plist_int.h lib: Convert internal sequence number to int64_t 2018-04-29 12:45:20 -04:00
plist.c Merge pull request #2945 from dslicenc/bgp-ospf-json 2018-09-01 05:05:30 +02:00
plist.h bgpd/ospfd: resolve warnings for bgp/ospf json commit 2018-08-30 15:54:46 +00:00
pqueue.c *: reindent 2017-07-17 14:04:07 +02:00
pqueue.h *: reindent 2017-07-17 14:04:07 +02:00
prefix.c *: rename zlog_fer -> flog_err 2018-08-14 20:02:05 +00:00
prefix.h bgpd, lib, ospfd, zebra: all_digit moved to frrstr 2018-06-19 17:59:53 +02:00
privs.c lib: add frr_elevate_privs() wrapper 2018-08-14 20:02:05 +00:00
privs.h lib: add frr_elevate_privs() wrapper 2018-08-14 20:02:05 +00:00
ptm_lib.c babeld, lib, ospfd, tests: fmt fixes (cppcheck) 2018-06-18 17:52:56 +02:00
ptm_lib.h lib: Allow memory to be cleaned up for error cases in ptm 2017-12-04 18:59:47 -05:00
pw.h ldpd: integrate with the pseudowire manager in zebra 2017-08-09 12:35:16 +02:00
qobj.c *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
qobj.h *: reindent 2017-07-17 14:04:07 +02:00
queue.h *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
ringbuf.c *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
ringbuf.h lib: add ringbuf_copy() 2018-01-03 14:04:43 -05:00
route_types.pl lib: Restrict redistribution cli a bit 2018-04-13 12:56:19 -04:00
route_types.txt bfdd: re-route PTM-BFD daemon messages 2018-08-08 18:25:04 -03:00
routemap.c lib: sort route-maps for display 2018-08-30 21:22:22 +00:00
routemap.h lib, bgpd, ospf6d, ospfd, pimd: Allow finish to cleanup a bit more 2018-08-03 08:22:45 -04:00
sbuf.c lib: out-of-bounds access (Coverity 1452539) 2018-06-22 00:06:07 +02:00
sbuf.h *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
sha256.c lib: Fix memset usage 2017-10-03 12:03:56 -04:00
sha256.h *: reindent 2017-07-17 14:04:07 +02:00
sigevent.c *: rename ferr_zlog -> flog_err_sys 2018-08-14 20:02:05 +00:00
sigevent.h *: reindent 2017-07-17 14:04:07 +02:00
skiplist.c *: rename zlog_fer -> flog_err 2018-08-14 20:02:05 +00:00
skiplist.h *: reindent 2017-07-17 14:04:07 +02:00
smux.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
snmp.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
sockopt.c lib: remove Linux 2.4 TCP-MD5 support 2018-08-25 02:56:05 +02:00
sockopt.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
sockunion.c *: use frr_elevate_privs() (2/2: manual) 2018-08-14 20:02:05 +00:00
sockunion.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
spf_backoff.c lib: Remove default case statement from a enum driven switch 2018-08-23 08:36:07 -04:00
spf_backoff.h *: reindent 2017-07-17 14:04:07 +02:00
srcdest_table.c isisd: make spf code dst-src aware 2018-08-03 13:25:39 +02:00
srcdest_table.h isisd: make spf code dst-src aware 2018-08-03 13:25:39 +02:00
stream.c lib: Convert stream_new to use one malloc 2018-08-22 07:58:54 -04:00
stream.h lib: Convert stream_new to use one malloc 2018-08-22 07:58:54 -04:00
strlcat.c lib: Fixup strlcat and strlcpy to be a bit more descriptive 2018-03-14 08:43:17 -04:00
strlcpy.c lib: Fixup strlcat and strlcpy to be a bit more descriptive 2018-03-14 08:43:17 -04:00
subdir.am Merge pull request #2913 from opensourcerouting/non-recursive-prep 2018-08-31 11:43:59 -04:00
systemd.c *: reindent 2017-07-17 14:04:07 +02:00
systemd.h *: reindent 2017-07-17 14:04:07 +02:00
table.c lib: prefix support for flowspec 2018-03-30 14:00:47 +02:00
table.h lib: Move aggregate pointer into aggregate route/table 2018-08-30 17:47:59 -04:00
termtable.c *: fix compiler warnings 2017-08-26 01:46:40 +02:00
termtable.h *: reindent 2017-07-17 14:04:07 +02:00
thread.c lib: Limit depth of unused thread list 2018-08-23 09:23:46 -04:00
thread.h lib: fix data race in thread history collection 2018-04-22 17:11:57 -04:00
vector.c lib: add vector_compact(), use after str splits 2018-06-06 16:16:12 +00:00
vector.h lib: add vector_compact(), use after str splits 2018-06-06 16:16:12 +00:00
version.h.in lib: add cli preprocessor for | actions 2018-06-06 16:15:34 +00:00
vlan.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
vrf_int.h *: reindent 2017-07-17 14:04:07 +02:00
vrf.c lib: avoid default vrf name memory allocation at startup 2018-08-28 16:23:50 +02:00
vrf.h *: add a vrf update hook to be informed of the vrf name 2018-08-28 16:23:50 +02:00
vty.c *: rename ferr_zlog -> flog_err_sys 2018-08-14 20:02:05 +00:00
vty.h lib: Add ability to know if we have read anything in 2018-06-19 08:43:59 -04:00
vxlan.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
wheel.c *: Convert list_delete(struct list *) to ** to allow nulling 2017-10-05 10:53:13 -04:00
wheel.h *: reindent 2017-07-17 14:04:07 +02:00
workqueue.c *: ALLOC calls cannot fail 2018-08-11 17:14:58 +02:00
workqueue.h lib: remove VERSION_TYPE_DEV from CONFDATE checks 2018-07-10 16:19:37 -04:00
zassert.h *: Remove cvs control points 2017-12-05 17:28:12 -05:00
zclient.c lib: overwrite default vrf name upon zapi vrf add event 2018-08-28 16:23:50 +02:00
zclient.h doc, lib, zebra: Remove deprecated encode and decode functionality 2018-08-24 10:56:15 -04:00
zebra.h lib, ripngd, zebra: Remove pre-solaris 9 special cased code 2018-08-15 15:06:53 -04:00