freebsd-dev/cmd/zed
Chris Dunlap 56697c4264 Obtain advisory lock on ZED PID file
ZED uses an advisory lock on its state file to protect against
multiple instances running concurrently.  However, work is planned
to move this state information into the kernel, and ZED will still
need to protect against starting multiple instances.

This commit adds an advisory lock on the PID file to protect against
starting multiple instances.  A lock failure can be overridden with
the "-f" (force) command-line option.  The advisory lock on the state
file is being retained for as long as the state information is stored
in the state file.

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2756
2014-10-06 13:17:40 -07:00
..
zed.d Refer to ZED's scripts as ZEDLETs 2014-09-25 13:54:17 -07:00
.gitignore Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
Makefile.am zed needs libzfs_core 2014-07-31 09:49:01 -07:00
zed_conf.c Obtain advisory lock on ZED PID file 2014-10-06 13:17:40 -07:00
zed_conf.h Obtain advisory lock on ZED PID file 2014-10-06 13:17:40 -07:00
zed_event.c Refer to ZED's scripts as ZEDLETs 2014-09-25 13:54:17 -07:00
zed_event.h Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zed_exec.c Refer to ZED's scripts as ZEDLETs 2014-09-25 13:54:17 -07:00
zed_exec.h Refer to ZED's scripts as ZEDLETs 2014-09-25 13:54:17 -07:00
zed_file.c Remove reverse indentation from zed comments. 2014-09-22 12:17:53 -07:00
zed_file.h Replace zed_file_create_dirs() with mkdirp() 2014-04-09 13:32:54 -07:00
zed_log.c Remove reverse indentation from zed comments. 2014-09-22 12:17:53 -07:00
zed_log.h Cleanup zed logging 2014-09-02 14:18:53 -07:00
zed_strings.c Replace zed's use of malloc with calloc 2014-09-25 13:43:57 -07:00
zed_strings.h Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
zed.c Obtain advisory lock on ZED PID file 2014-10-06 13:17:40 -07:00
zed.h Refer to ZED's scripts as ZEDLETs 2014-09-25 13:54:17 -07:00