Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make LDMSD create a PID file only when a path is specified
Without the patch, LDMSD always creates a PID file. It determines the PID file location in the following order: the command-line option `-r`, the environment variables `LDMSD_PIDFILE`, and the default path `/var/run/ldmsd.pid`. Running LDMSD as a non-root user withput specifying a PID file path always causes a permission-denied error message because a non-root user cannot access `/var/run` directory. The patch changes LDMSD so that it only create a PID file when either the command-line option `-r` or the config command `pid_path` is specified. Regarding starting LDMSD via `systemd`, `systemd` can be configured to create a PID file for LDMSD.
- Loading branch information