numam-spdk/lib/rpc
GangCao dbeed703c2 rpc: remove the existing socket file when application starts
Currently if the application exits with some error (i.e., core
dump), the socket file is not removed. So that at next time the
RPC method can not enabled unless user manually removes the
socket file. The error of failing to start RPC is not that
obvious.

This patch introduces a lock for the reuse socket to properly
detect the only usage and handles the above error case particularly.

Refer to https://gavv.github.io/blog/unix-socket-reuse/ for the
details.

For the concern of the sockect file can be shared from different
applications, in the spdk_app_opts struct, it offers a parameter
to assign a specific socket file per application.

Change-Id: Ie2ef6af9207c468279cba5efd173fd06579ccdc7
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/396089
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-02 16:48:53 -05:00
..
Makefile build: remove $(ENV_CFLAGS) where not necessary 2018-01-03 12:05:59 -05:00
rpc.c rpc: remove the existing socket file when application starts 2018-03-02 16:48:53 -05:00