From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id DAA21328 for ; Tue, 11 Jun 1996 03:14:52 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id NAA25059; Mon, 10 Jun 1996 13:03:19 -0400 (EDT) Resent-Date: Mon, 10 Jun 1996 13:02:35 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199606101703.TAA05789@bolyai.cs.elte.hu> Subject: Re: zsh-2.6beta20 doesn't compile under Linux pre2.0.14 To: jkroeger@squirrel.owl.de Date: Mon, 10 Jun 1996 19:03:16 +0200 (MET DST) Cc: zsh-users@math.gatech.edu In-Reply-To: <19960607203126.2843.qmail@squirrel.owl.de> from "jkroeger@squirrel.owl.de" at "Jun 7, 96 08:31:26 pm" Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368 X-Mailer: ELM [version 2.4ME+ PL16 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"cwIkt3.0.q66.gK5ln"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/244 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > Recent Linux kernels introduced a new limit for the address space of a process: > > #define RLIMIT_AS 9 /* address space limit */ > > This makes compiling zsh fail with the following error message: > > builtin.c:3539: #error there are some unknown limits. Fix me! > make[1]: *** [builtin.o] Error 1 > make[1]: Leaving directory `/usr/src/bin/zsh-2.6-beta20/Src' > make: *** [Src] Error 2 > > Unfortunately I don't know how to fix zsh so that it can handle the new > resource limit :-( It is surprising that the there days before the final 2.0 release a new feature appeared. Here is the patch. I think zsh will be the first shell which can set this new limit. There is no patch to the manual simply because I do not know what is this limit. Also a new flag should be inveted to set this limit with ulimit. Please tell me your suggestions. Zoltan *** Src/builtin.c 1996/06/06 17:23:43 2.39 --- Src/builtin.c 1996/06/10 16:53:08 *************** *** 3535,3540 **** --- 3535,3545 ---- # define NEXT_RLIM (RLIMIT_MEMLOCK + 1) "memorylocked", # endif /* RLIMIT_MEMLOCK */ + # if defined RLIMIT_AS && RLIMIT_AS == NEXT_RLIM + # undef NEXT_RLIM + # define NEXT_RLIM (RLIMIT_AS + 1) + "addressspace", + # endif /* RLIMIT_AS */ # if NEXT_RLIM != RLIM_NLIMITS #error there are some unknown limits. Fix me! # endif *************** *** 3957,3962 **** --- 3962,3973 ---- limit /= 1024; break; # endif /* RLIMIT_VMEM */ + # ifdef RLIMIT_AS + case RLIMIT_AS: + printf("address space (kb) "); + limit /= 1024; + break; + # endif /* RLIMIT_AS */ } /* display the limit */ if (limit == RLIM_INFINITY)