From 14c0903ea8e6e04e50298ababa9d0a9183dfeb39 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sat, 29 Oct 2005 21:21:02 +1000 Subject: [SIGNAL] Added default implementation of killpg klibc doesn't have killpg. Since we only call it for valid values of pid, we can call kill instead. --- src/system.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') 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 +#include 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 -- cgit 1.4.1