Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make PR/45042: Thomas Cort: HAVE_foo for setrlimit(2...



details:   https://anonhg.NetBSD.org/src/rev/7ed9a3433116
branches:  trunk
changeset: 785137:7ed9a3433116
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Feb 26 00:45:27 2013 +0000

description:
PR/45042: Thomas Cort: HAVE_foo for setrlimit(2) and setpgid(2)

diffstat:

 usr.bin/make/job.c  |  8 +++++---
 usr.bin/make/main.c |  8 ++++----
 2 files changed, 9 insertions(+), 7 deletions(-)

diffs (77 lines):

diff -r 7a92fb4d2c49 -r 7ed9a3433116 usr.bin/make/job.c
--- a/usr.bin/make/job.c        Mon Feb 25 18:49:51 2013 +0000
+++ b/usr.bin/make/job.c        Tue Feb 26 00:45:27 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: job.c,v 1.169 2013/02/06 16:36:01 christos Exp $       */
+/*     $NetBSD: job.c,v 1.170 2013/02/26 00:45:27 christos Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.169 2013/02/06 16:36:01 christos Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.170 2013/02/26 00:45:27 christos Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)job.c      8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: job.c,v 1.169 2013/02/06 16:36:01 christos Exp $");
+__RCSID("$NetBSD: job.c,v 1.170 2013/02/26 00:45:27 christos Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1376,12 +1376,14 @@
         * we can kill it and all its descendants in one fell swoop,
         * by killing its process family, but not commit suicide.
         */
+#if defined(MAKE_NATIVE) || defined(HAVE_SETPGID)
 #if defined(SYSV)
        /* XXX: dsl - I'm sure this should be setpgrp()... */
        (void)setsid();
 #else
        (void)setpgid(0, getpid());
 #endif
+#endif
 
        Var_ExportVars();
 
diff -r 7a92fb4d2c49 -r 7ed9a3433116 usr.bin/make/main.c
--- a/usr.bin/make/main.c       Mon Feb 25 18:49:51 2013 +0000
+++ b/usr.bin/make/main.c       Tue Feb 26 00:45:27 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.208 2013/02/25 00:15:09 dholland Exp $      */
+/*     $NetBSD: main.c,v 1.209 2013/02/26 00:45:27 christos Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.208 2013/02/25 00:15:09 dholland Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.209 2013/02/26 00:45:27 christos Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.208 2013/02/25 00:15:09 dholland Exp $");
+__RCSID("$NetBSD: main.c,v 1.209 2013/02/26 00:45:27 christos Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -799,7 +799,7 @@
                progname++;
        else
                progname = argv[0];
-#ifdef RLIMIT_NOFILE
+#if defined(MAKE_NATIVE) || (defined(HAVE_SETRLIMIT) && defined(RLIMIT_NOFILE))
        /*
         * get rid of resource limit on file descriptors
         */



Home | Main Index | Thread Index | Old Index