Improve corosync-notifyd example

Example now contains default option -d, so corosync-notifyd init script
don't fall. Also description is improved a little bit.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Install sysconfig/corosync-notifyd in specfile

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Free confdb message holder list on confdb exit

This operation will not only properly free memory, but also decreases
connection reference(s). This should solve deadloop in
coroipcs_ipc_service_exit, because confdb_exit_fn removes not only
notify_pipe but also deletes poll_dispatch, so nobody is left to
unreference connections.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Handle SIGPIPE in req_setup_send

When IPC client exits exactly when req_setup_send function calls send,
SIGPIPE is generated and corosync (because SIGPIPE is not handled)
exits. Solution is to use MSG_NOSIGNAL as flag.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
confdb: Make objdb_notify_dispatch preemptable

objdb_notify_dispatch traverse thru confdb_ipc_message_holder_list list
until it's empty. If IPC connection is still feeding confdb/objdb with
changes then iteration will never end. To prevent this and let corosync
properly preempt, terminal condition is enhanced with maximum number of
processed items from list. Change makes confdb preemptable so corosync
can accept new connections, receive/send token, ...

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Remove unnecessary mmap in memory_map ipc

This is similar patch as master e684e4ca6fed709c14d79d8d81f254aa48e1c65a
but for whole IPC.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Lock sync_in_process variable

sync_in_process is changed by coropoll thread (main thread) but used by
all IPC connections. To ensure correct value is read, mutex is added.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>