Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh-2.6beta20 doesn't compile under Linux pre2.0.14



> 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)




Messages sorted by: Reverse Date, Date, Thread, Author