From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10895 invoked by alias); 17 Aug 2012 11:36:04 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30629 Received: (qmail 2012 invoked from network); 17 Aug 2012 11:35:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Fri, 17 Aug 2012 12:35:35 +0100 From: Peter Stephenson To: Subject: Re: pkgsrc patches for zsh [was Re: tgoto issue in zsh-5.0.0] Message-ID: <20120817123535.62ab00a1@pwslap01u.europe.root.pri> In-Reply-To: <20120817105019.GB2428@danbala.tuwien.ac.at> References: <20120816120421.GE2428@danbala.tuwien.ac.at> <20120816140734.20a7def9@pwslap01u.europe.root.pri> <20120816132053.GJ2428@danbala.tuwien.ac.at> <20120816142517.188972cd@pwslap01u.europe.root.pri> <20120816142504.GO2428@danbala.tuwien.ac.at> <20120816201848.4b442246@pws-pc.ntlworld.com> <20120817081109.GU2428@danbala.tuwien.ac.at> <20120817103803.73f82242@pwslap01u.europe.root.pri> <20120817105019.GB2428@danbala.tuwien.ac.at> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.101.10.18] X-Scanned-By: MailControl 8316.0 (www.mailcontrol.com) on 10.68.0.130 On Fri, 17 Aug 2012 12:50:19 +0200 Thomas Klausner wrote: > What's the "-N 9" part, should that be support explicitly as well? Ah, I noticed that but didn't see it on your list from sh --- now I look more closely, that's -b, so that should be added too. We support the resource, just not the option letter. It's done as bytes, not kilobytes, so I changed that, too. Index: Doc/Zsh/builtins.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/builtins.yo,v retrieving revision 1.140 diff -p -u -r1.140 builtins.yo --- Doc/Zsh/builtins.yo 17 Aug 2012 11:12:35 -0000 1.140 +++ Doc/Zsh/builtins.yo 17 Aug 2012 11:34:10 -0000 @@ -1764,6 +1764,7 @@ tt(ulimit -a) will show which are suppor startsitem() sitem(tt(-a))(Lists all of the current resource limits.) +sitem(tt(-b))(Socket buffer size in bytes LPAR()N.B. not kilobytes+RPAR()) sitem(tt(-c))(512-byte blocks on the size of core dumps.) sitem(tt(-d))(K-bytes on the size of the data segment.) sitem(tt(-f))(512-byte blocks on the size of files written.) Index: Src/Builtins/rlimits.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Builtins/rlimits.c,v retrieving revision 1.26 diff -p -u -r1.26 rlimits.c --- Src/Builtins/rlimits.c 17 Aug 2012 11:12:35 -0000 1.26 +++ Src/Builtins/rlimits.c 17 Aug 2012 11:34:10 -0000 @@ -365,9 +365,7 @@ printulimit(char *nam, int lim, int hard # ifdef HAVE_RLIMIT_SBSIZE case RLIMIT_SBSIZE: if (head) - printf("-N %2d: socket buffer size (kb) ", RLIMIT_SBSIZE); - if (limit != RLIM_INFINITY) - limit /= 1024; + printf("-b: socket buffer size (bytes)", RLIMIT_SBSIZE); break; # endif /* HAVE_RLIMIT_SBSIZE */ # ifdef HAVE_RLIMIT_PTHREAD @@ -782,16 +780,21 @@ bin_ulimit(char *name, char **argv, UNUS case 'c': res = RLIMIT_CORE; break; -# ifdef HAVE_RLIMIT_RSS - case 'm': - res = RLIMIT_RSS; +# ifdef HAVE_RLIMIT_SBSIZE + case 'b': + res = RLIMIT_SBSIZE; break; -# endif /* HAVE_RLIMIT_RSS */ +# endif /* HAVE_RLIMIT_SBSIZE */ # ifdef HAVE_RLIMIT_MEMLOCK case 'l': res = RLIMIT_MEMLOCK; break; # endif /* HAVE_RLIMIT_MEMLOCK */ +# ifdef HAVE_RLIMIT_RSS + case 'm': + res = RLIMIT_RSS; + break; +# endif /* HAVE_RLIMIT_RSS */ # ifdef HAVE_RLIMIT_NOFILE case 'n': res = RLIMIT_NOFILE; -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog