Module Name: othersrc Committed By: dholland Date: Sat Mar 23 23:29:04 UTC 2013
Modified Files: othersrc/usr.bin/dholland-make2: job.c main.c portable.h Log Message: Merge -r1.170 of job.c and -r1.209 of main.c from HEAD (committed by Christos): PR/45042: Thomas Cort: HAVE_foo for setrlimit(2) and setpgid(2) To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 othersrc/usr.bin/dholland-make2/job.c \ othersrc/usr.bin/dholland-make2/portable.h cvs rdiff -u -r1.10 -r1.11 othersrc/usr.bin/dholland-make2/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: othersrc/usr.bin/dholland-make2/job.c diff -u othersrc/usr.bin/dholland-make2/job.c:1.6 othersrc/usr.bin/dholland-make2/job.c:1.7 --- othersrc/usr.bin/dholland-make2/job.c:1.6 Sat Mar 23 22:08:21 2013 +++ othersrc/usr.bin/dholland-make2/job.c Sat Mar 23 23:29:04 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.6 2013/03/23 22:08:21 dholland Exp $ */ +/* $NetBSD: job.c,v 1.7 2013/03/23 23:29:04 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -149,7 +149,7 @@ #include "trace.h" # define STATIC static -MAKE_RCSID("$NetBSD: job.c,v 1.6 2013/03/23 22:08:21 dholland Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.7 2013/03/23 23:29:04 dholland Exp $"); /* * error handling variables @@ -1374,12 +1374,14 @@ JobExec(Job *job, char **argv) * 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(); Index: othersrc/usr.bin/dholland-make2/portable.h diff -u othersrc/usr.bin/dholland-make2/portable.h:1.6 othersrc/usr.bin/dholland-make2/portable.h:1.7 --- othersrc/usr.bin/dholland-make2/portable.h:1.6 Mon Mar 4 05:47:15 2013 +++ othersrc/usr.bin/dholland-make2/portable.h Sat Mar 23 23:29:04 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: portable.h,v 1.6 2013/03/04 05:47:15 dholland Exp $ */ +/* $NetBSD: portable.h,v 1.7 2013/03/23 23:29:04 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -119,6 +119,8 @@ * MAKE_NATIVE should be set if building native w/o autoconf * * If MAKE_NATIVE isn't set: + * HAVE_SETPGID set if build platform has setpgid() + * HAVE_SETRLIMIT set if build platform has setrlimit() * HAVE_STRERROR set if build platform has strerror() * HAVE_STRFTIME set if build platform has strftime() * HAVE_VSNPRINTF set if build platform has (v)snprintf() Index: othersrc/usr.bin/dholland-make2/main.c diff -u othersrc/usr.bin/dholland-make2/main.c:1.10 othersrc/usr.bin/dholland-make2/main.c:1.11 --- othersrc/usr.bin/dholland-make2/main.c:1.10 Sat Mar 23 19:57:44 2013 +++ othersrc/usr.bin/dholland-make2/main.c Sat Mar 23 23:29:04 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.10 2013/03/23 19:57:44 dholland Exp $ */ +/* $NetBSD: main.c,v 1.11 2013/03/23 23:29:04 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -128,7 +128,7 @@ MAKE_COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\ The Regents of the University of California. All rights reserved."); -MAKE_RCSID("$NetBSD: main.c,v 1.10 2013/03/23 19:57:44 dholland Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.11 2013/03/23 23:29:04 dholland Exp $"); #ifndef DEFMAXLOCAL @@ -777,7 +777,7 @@ main(int argc, char **argv) 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 */