Hi,
I noticed that tcpbench tries to setpgid() for no obvious reason (to me)
since it's not forked anymore. Previously, 2 years ago it was fork()ed
and utilized killpg() etc. Could this be a leftover? I'm running into
issues spawning tcpbench since my parent process uses setsid().
I attached a patch (against 5.0) to remove the code :)
Regards
Erik Lax
Index: usr.bin/tcpbench/tcpbench.c
===================================================================
RCS file: /cvs/src/usr.bin/tcpbench/tcpbench.c,v
retrieving revision 1.22
diff -u -r1.22 tcpbench.c
--- usr.bin/tcpbench/tcpbench.c 21 Jun 2011 17:31:07 -0000 1.22
+++ usr.bin/tcpbench/tcpbench.c 31 Jan 2012 10:27:50 -0000
@@ -703,9 +703,6 @@
struct event *ev;
nfds_t lnfds;
- if (setpgid(0, 0) == -1)
- err(1, "setpgid");
-
lnfds = 0;
for (ai = aitop; ai != NULL; ai = ai->ai_next) {
saddr_ntop(ai->ai_addr, ai->ai_addrlen, tmp, sizeof(tmp));