aboutsummaryrefslogtreecommitdiff
path: root/src/rc/rc-misc.c
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2018-05-18 16:48:21 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-05-18 16:48:21 -0500
commitfaa8318b3ba278544413a39d4a5ae4457711793f (patch)
tree7bdc8f2dd29a428f142194cde461987be856918b /src/rc/rc-misc.c
parent08da36149c0b41c64a09369c3eef5e2f5a6fa39c (diff)
Remove the _rc_can_find_pids function
This test to find if we could see pid 1 was being used inconsistently in rc-status and mark_service_crashed to decide whether we could test to see if the daemon for the service was crashed, and it was not part of the librc library. I am removing it from the executables because of inconsistent usage. I will add it to the library if it is needed there.
Diffstat (limited to 'src/rc/rc-misc.c')
-rw-r--r--src/rc/rc-misc.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/rc/rc-misc.c b/src/rc/rc-misc.c
index 50c09747..e933409f 100644
--- a/src/rc/rc-misc.c
+++ b/src/rc/rc-misc.c
@@ -411,34 +411,6 @@ RC_DEPTREE * _rc_deptree_load(int force, int *regen)
return rc_deptree_load();
}
-bool _rc_can_find_pids(void)
-{
- RC_PIDLIST *pids;
- RC_PID *pid;
- RC_PID *pid2;
- bool retval = false;
-
- if (geteuid() == 0)
- return true;
-
- /* If we cannot see process 1, then we don't test to see if
- * services crashed or not */
- pids = rc_find_pids(NULL, NULL, 0, 1);
- if (pids) {
- pid = LIST_FIRST(pids);
- if (pid) {
- retval = true;
- while (pid) {
- pid2 = LIST_NEXT(pid, entries);
- free(pid);
- pid = pid2;
- }
- }
- free(pids);
- }
- return retval;
-}
-
static const struct {
const char * const name;
RC_SERVICE bit;