From 4cdff8cfe893e7039b4ef8272ed66a8a05bc8e04 Mon Sep 17 00:00:00 2001 From: markus schnalke Date: Mon, 26 Mar 2012 14:17:06 +0200 Subject: [PATCH] There's no need for killpg(). We can use kill() instead. (Also removed a now unused define.) --- configure.ac | 2 +- h/nmh.h | 17 ----------------- uip/slocal.c | 2 +- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/configure.ac b/configure.ac index 20bcbd1..cb5a79a 100644 --- a/configure.ac +++ b/configure.ac @@ -367,7 +367,7 @@ dnl CHECK FUNCTIONS dnl --------------- AC_CHECK_LIB(mkstemp,mkstemp) AC_CHECK_FUNCS(waitpid sigaction sigprocmask sigblock sigsetmask \ - sighold sigrelse lstat uname tzset killpg mkstemp \ + sighold sigrelse lstat uname tzset mkstemp \ getutent nl_langinfo mbtowc wcwidth) dnl sigsetjmp may be a macro diff --git a/h/nmh.h b/h/nmh.h index 26eb0a2..896786f 100644 --- a/h/nmh.h +++ b/h/nmh.h @@ -85,17 +85,6 @@ #endif /* -** we should get this value from sysconf(_SC_NGROUPS_MAX) -*/ -#ifndef NGROUPS_MAX -# ifdef NGROUPS -# define NGROUPS_MAX NGROUPS -# else -# define NGROUPS_MAX 16 -# endif -#endif - -/* ** we should be getting this value from sysconf(_SC_OPEN_MAX) */ #ifndef OPEN_MAX @@ -109,12 +98,6 @@ #include -#ifdef HAVE_KILLPG -# define KILLPG(pgrp,sig) killpg(pgrp,sig); -#else -# define KILLPG(pgrp,sig) kill((-pgrp),sig); -#endif - /* ** If your stat macros are broken, ** we will just undefine them. diff --git a/uip/slocal.c b/uip/slocal.c index 608ddf2..9865839 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -1164,7 +1164,7 @@ usr_pipe(int fd, char *cmd, char *pgm, char **vec, int suppress) ** Ruthlessly kill the child and anything ** else in its process group. */ - KILLPG(child_id, SIGKILL); + kill(-child_id, SIGKILL); if (verbose) verbose_printf(", timed-out; terminated\n"); return -1; -- 1.7.10.4