summary refs log tree commit diff
path: root/src/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/system.h')
-rw-r--r--src/system.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h
index 0842675..1242e24 100644
--- a/src/system.h
+++ b/src/system.h
@@ -27,6 +27,7 @@
  */
 
 #include <signal.h>
+#include <sys/types.h>
 
 static inline void sigclearmask(void)
 {
@@ -67,3 +68,14 @@ char *strsignal(int);
 void *bsearch(const void *, const void *, size_t, size_t,
 	      int (*)(const void *, const void *));
 #endif
+
+#ifndef HAVE_KILLPG
+static inline int killpg(pid_t pid, int signal)
+{
+#ifdef DEBUG
+	if (pid < 0)
+		abort();
+#endif
+	return kill(-pid, signal);
+}
+#endif