summaryrefslogtreecommitdiffhomepage
path: root/utils.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-10-21 15:49:11 +0200
committerFelix Fietkau <nbd@openwrt.org>2013-10-22 14:10:33 +0200
commitf80b9e4acc47cf454768b44142495fdb8a68a39f (patch)
tree799f4f70ae544067ba2135746a3265a907613ef4 /utils.h
parent381f47c5af62cec173528f5f539558d7a18b6d30 (diff)
utils: add a function for checking if a process given by pid is still alive
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 23795e5..b0a7d02 100644
--- a/utils.h
+++ b/utils.h
@@ -14,6 +14,7 @@
#ifndef __NETIFD_UTILS_H
#define __NETIFD_UTILS_H
+#include <unistd.h>
#include <stdio.h>
#include <libubox/list.h>
#include <libubox/avl.h>
@@ -107,6 +108,7 @@ static inline int fls(int x)
unsigned int parse_netmask_string(const char *str, bool v6);
bool split_netmask(char *str, unsigned int *netmask, bool v6);
int parse_ip_and_netmask(int af, const char *str, void *addr, unsigned int *netmask);
+bool check_pid_path(int pid, const char *exe);
char * format_macaddr(uint8_t *mac);