Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 99564 invoked from network); 6 Sep 2006 22:13:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Sep 2006 22:13:10 -0000 Received: (qmail 84496 invoked by uid 500); 6 Sep 2006 22:13:10 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 84441 invoked by uid 500); 6 Sep 2006 22:13:10 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 84430 invoked by uid 99); 6 Sep 2006 22:13:10 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Sep 2006 15:13:10 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [208.30.140.160] (HELO moroha.quovadx.com) (208.30.140.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Sep 2006 15:13:08 -0700 Received: from qxvcexch01.ad.quovadx.com (qxvcexch01.ad.quovadx.com [192.168.170.59]) by moroha.quovadx.com (8.13.6/8.13.6) with ESMTP id k86MCgE5030768 for ; Wed, 6 Sep 2006 22:12:42 GMT Received: from [10.70.3.113] ([10.70.3.113]) by qxvcexch01.ad.quovadx.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 6 Sep 2006 16:12:53 -0600 Message-ID: <44FF50CE.3090803@roguewave.com> Date: Wed, 06 Sep 2006 16:50:54 -0600 From: Martin Sebor Organization: Rogue Wave Software User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 X-Accept-Language: en-us, en MIME-Version: 1.0 To: stdcxx-dev@incubator.apache.org Subject: Re: [patch] exec utility child process limits (unix) References: <44EB7711.30706@roguewave.com> <44EF86D3.10505@roguewave.com> <44F36AE5.4040406@roguewave.com> In-Reply-To: <44F36AE5.4040406@roguewave.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Sep 2006 22:12:53.0144 (UTC) FILETIME=[99109980:01C6D201] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Andrew Black wrote: > Ok. > > Attached is take two on the patch. Sorry I've been taking so long to look at this... [...] > Index: cmdopt.h > =================================================================== > --- cmdopt.h (revision 437752) > +++ cmdopt.h (working copy) > @@ -39,6 +39,27 @@ > extern const char suffix_sep; /**< File suffix seperator. */ > extern const size_t exe_suffix_len; /**< Length of executable suffix. */ > > +#if defined (_WIN32) || defined (_WIN64) || !defined (_XOPEN_UNIX) You need to #include before testing _XOPEN_UNIX. (The patch fails to compile on Solaris because of this.) I'm also not sure it's safe to assume struct rlimit is not defined when the macro is undefined. I think a better way to handle this might be to introduce rw_rlimit and either make it a typedef for struct rlimit when the latter can safely be assumed to exist (i.e., when _XOPEN_UNIX is #defined in ), or define it identically to struct rlimit otherwise. Also, I'm growing increasingly uneasy about the growing number of global variables used throughout the program. I realize that some may be unavoidable but I would welcome a patch to reduce their number and consolidate the rest according their function (e.g., all those used to invoke the child process, including the new child_limits). Martin