r15989: try to make timelimit.c more portable
authorStefan Metzmacher <metze@samba.org>
Thu, 1 Jun 2006 06:11:31 +0000 (06:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:17:17 +0000 (11:17 -0500)
Patch from Bjoern Jacke (Thanks!)

metze

source/script/tests/timelimit.c

index 5b8281cb0dc6ad0b22421e5b8a807abb21470ebb..32e58f52498cb8b514ced302ccaf9e7c93108f49 100644 (file)
@@ -53,17 +53,10 @@ static void sig_usr1(int sig)
 
 static void new_process_group(void)
 {
-#ifdef BSD_SETPGRP
-       if (setpgrp(0,0) == -1) {
-               perror("setpgrp");
+       if (setpgid(0,0) == -1) {
+               perror("setpgid");
                exit(1);
        }
-#else
-       if (setpgrp() == -1) {
-               perror("setpgrp");
-               exit(1);
-       }
-#endif
 }