diff options
author | Darren Tucker <dtucker@dtucker.net> | 2022-03-09 09:41:56 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2022-03-09 09:41:56 +1100 |
commit | 5ae31a0fdd27855af29f48ff027491629fff5979 (patch) | |
tree | 06c838ce325fd6321812afc506c9e4b499b73db2 | |
parent | c41c84b439f4cd74d4fe44298a4b4037ddd7d2ae (diff) |
Provide killpg implementation.
Based on github PR#301 for Tandem NonStop.
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | openbsd-compat/bsd-misc.c | 8 | ||||
-rw-r--r-- | openbsd-compat/openbsd-compat.h | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 41761c5b..42fd890b 100644 --- a/configure.ac +++ b/configure.ac @@ -1876,6 +1876,7 @@ AC_CHECK_FUNCS([ \ inet_ntoa \ inet_ntop \ innetgr \ + killpg \ llabs \ localtime_r \ login_getcapbool \ diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c index d9c9b267..3b00ef6d 100644 --- a/openbsd-compat/bsd-misc.c +++ b/openbsd-compat/bsd-misc.c @@ -412,6 +412,14 @@ getsid(pid_t pid) } #endif +#ifndef HAVE_KILLPG +int +killpg(pid_t pgrp, int sig) +{ + return kill(pgrp, sig); +} +#endif + #ifdef FFLUSH_NULL_BUG #undef fflush int _ssh_compat_fflush(FILE *f) diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index 0cecfb62..4316ab84 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h @@ -82,6 +82,10 @@ int getpagesize(void); char *getcwd(char *pt, size_t size); #endif +#ifndef HAVE_KILLPG +int killpg(pid_t, int); +#endif + #if defined(HAVE_DECL_MEMMEM) && HAVE_DECL_MEMMEM == 0 void *memmem(const void *, size_t, const void *, size_t); #endif |