From 50a7697bf207e4919ce893bfc1604fd3a9d807de Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 17 Mar 2008 09:59:52 +0000 Subject: rc_find_pids now returns RC_PIDLIST instead of a NULL terminated array. --- src/librc/rc.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/librc/rc.h') diff --git a/src/librc/rc.h b/src/librc/rc.h index 061959e7..bf40e31c 100644 --- a/src/librc/rc.h +++ b/src/librc/rc.h @@ -451,6 +451,13 @@ void rc_stringlist_free(RC_STRINGLIST *); * @return pointer to the new path */ char *rc_strcatpaths(const char *, const char *, ...) SENTINEL; +typedef struct rc_pid +{ + pid_t pid; + LIST_ENTRY(rc_pid) entries; +} RC_PID; +typedef LIST_HEAD(rc_pidlist, rc_pid) RC_PIDLIST; + /*! Find processes based on criteria. * All of these are optional. * pid overrides anything else. @@ -460,6 +467,6 @@ char *rc_strcatpaths(const char *, const char *, ...) SENTINEL; * @param uid to check for * @param pid to check for * @return NULL terminated list of pids */ -pid_t *rc_find_pids(const char *const *, const char *, uid_t, pid_t); +RC_PIDLIST *rc_find_pids(const char *const *, const char *, uid_t, pid_t); #endif -- cgit v1.2.3