* About to release 3.0.7 ...
@ 1999-10-17 21:26 Bart Schaefer
1999-10-17 23:46 ` Jos Backus
0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 1999-10-17 21:26 UTC (permalink / raw)
To: zsh-workers
I've put candidates for the 3.0.7 release on ftp.brasslatern.com:/pub/zsh/.
I'm pretty confident that there's no reason to do any "test" releases for
the changes since 3.0.6, but given how alert I was last night I thought I'd
better ask that some other people check it for obvious boneheadedness before
I send it to the official ftp site.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About to release 3.0.7 ...
1999-10-17 21:26 About to release 3.0.7 Bart Schaefer
@ 1999-10-17 23:46 ` Jos Backus
1999-10-18 4:30 ` "limit sbsize" Bart Schaefer
1999-10-18 10:16 ` About to release 3.0.7 Zefram
0 siblings, 2 replies; 6+ messages in thread
From: Jos Backus @ 1999-10-17 23:46 UTC (permalink / raw)
To: Bart Schaefer; +Cc: zsh-workers
Hi Bart,
FreeBSD -current has recently acquired a new limit type:
>From /usr/include/sys/resource.h:
#define RLIMIT_SBSIZE 9 /* maximum size of all socket buffers */
This causes Src/rlimits.awk to exit with badlimit == 1:
awk -f ./rlimits.awk /usr/include/sys/resource.h > rlimits.h
*** Error code 1
Stop in /usr/local/src/zsh-3.0.7/Src.
*** Error code 1
Stop in /usr/local/src/zsh-3.0.7.
jos:/usr/local/src/zsh-3.0.7# cat Src/rlimits.h
/** rlimits.h **/
/** architecture-customized limits for zsh **/
#define ZSH_NLIMITS 10
static char *recs[ZSH_NLIMITS+1] = {
"cputime",
"filesize",
"datasize",
"stacksize",
"coredumpsize",
"memoryuse",
"memorylocked",
"maxproc",
"descriptors",
"SBSIZE",
NULL
};
Suggested fix:
--- Src/rlimits.awk.orig Mon Oct 18 01:44:46 1999
+++ Src/rlimits.awk Mon Oct 18 01:45:22 1999
@@ -37,6 +37,7 @@
if (limnam == "TCACHE") { msg[limnum] = "cachedthreads" }
if (limnam == "AIO_OPS") { msg[limnum] = "aiooperations" }
if (limnam == "AIO_MEM") { msg[limnum] = "aiomemorylocked" }
+ if (limnam == "SBSIZE") { msg[limnum] = "sbsize" }
}
}
}
Thanks,
--
Jos Backus _/ _/_/_/ "Reliability means never
_/ _/ _/ having to say you're sorry."
_/ _/_/_/ -- D. J. Bernstein
_/ _/ _/ _/
Jos.Backus@nl.origin-it.com _/_/ _/_/_/ use Std::Disclaimer;
^ permalink raw reply [flat|nested] 6+ messages in thread
* "limit sbsize"
1999-10-17 23:46 ` Jos Backus
@ 1999-10-18 4:30 ` Bart Schaefer
1999-10-18 10:16 ` About to release 3.0.7 Zefram
1 sibling, 0 replies; 6+ messages in thread
From: Bart Schaefer @ 1999-10-18 4:30 UTC (permalink / raw)
To: zsh-workers
On Oct 18, 1:46am, Jos Backus wrote:
} Subject: Re: About to release 3.0.7 ...
}
} + if (limnam == "SBSIZE") { msg[limnum] = "sbsize" }
I had to apply that by hand because the tabs have been converted to spaces.
I'm not going to fret about documenting this for 3.0.7, but here's a doc
hunk for 3.1.6.
Index: Doc/Zsh/builtins.yo
===================================================================
@@ -525,6 +525,7 @@
sitem(tt(cachedthreads))(Maximum number of cached threads.)
sitem(tt(aiooperations))(Maximum number of AIO operations.)
sitem(tt(aiomemorylocked))(Maximum amount of memory locked in RAM for AIO operations.)
+sitem(tt(sbsize))(Maximum size of all socket buffers.)
endsitem()
Which of these resource limits are available depends on the system.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About to release 3.0.7 ...
1999-10-17 23:46 ` Jos Backus
1999-10-18 4:30 ` "limit sbsize" Bart Schaefer
@ 1999-10-18 10:16 ` Zefram
1999-10-18 15:48 ` Bart Schaefer
1 sibling, 1 reply; 6+ messages in thread
From: Zefram @ 1999-10-18 10:16 UTC (permalink / raw)
To: Jos.Backus; +Cc: schaefer, zsh-workers
Jos Backus wrote:
>+ if (limnam == "SBSIZE") { msg[limnum] = "sbsize" }
This is not a good name. zsh's resource limit names tend to be more
verbose, so you don't need to know the system to see what is being
limited. I suggest the name "sktbuffersize".
Two more general resource limit issues:
1. It should be possible to distinguish between there being unknown limits
(a non-fatal condition) and genuine errors in running rlimits.awk.
2. Some limits aren't being handled the right way (memory type limits
vs pure numeric vs time spans). It's currently excessively awkward
to get them right; we need a more general mechanism.
Here's a patch fixing these problems and making a couple of other minor
cleanups. This is against an unpatched 3.1.6-bart-7.
-zefram
diff -cr ../zsh-3.1.6-bart-7.old/Doc/Zsh/builtins.yo ./Doc/Zsh/builtins.yo
*** ../zsh-3.1.6-bart-7.old/Doc/Zsh/builtins.yo Thu Oct 14 04:21:54 1999
--- ./Doc/Zsh/builtins.yo Mon Oct 18 10:03:47 1999
***************
*** 511,530 ****
var(resource) can be one of:
startsitem()
! sitem(tt(memorylocked))(Maximum amount of memory locked in RAM.)
! sitem(tt(resident))(Maximum resident set size.)
! sitem(tt(vmemorysize))(Maximum amount of virtual memory.)
! sitem(tt(descriptors))(Maximum value for a file descriptor.)
sitem(tt(coredumpsize))(Maximum size of a core dump.)
! sitem(tt(stacksize))(Maximum stack size for each process.)
sitem(tt(datasize))(Maximum data size (including stack) for each process.)
sitem(tt(filesize))(Largest single file allowed.)
- sitem(tt(cputime))(Maximum CPU seconds per process.)
sitem(tt(maxproc))(Maximum number of processes.)
! sitem(tt(addressspace))(Maximum amount of address space used.)
! sitem(tt(cachedthreads))(Maximum number of cached threads.)
! sitem(tt(aiooperations))(Maximum number of AIO operations.)
! sitem(tt(aiomemorylocked))(Maximum amount of memory locked in RAM for AIO operations.)
endsitem()
Which of these resource limits are available depends on the system.
--- 511,532 ----
var(resource) can be one of:
startsitem()
! sitem(tt(addressspace))(Maximum amount of address space used.)
! sitem(tt(aiomemorylocked))(Maximum amount of memory locked in RAM for AIO operations.)
! sitem(tt(aiooperations))(Maximum number of AIO operations.)
! sitem(tt(cachedthreads))(Maximum number of cached threads.)
sitem(tt(coredumpsize))(Maximum size of a core dump.)
! sitem(tt(cputime))(Maximum CPU seconds per process.)
sitem(tt(datasize))(Maximum data size (including stack) for each process.)
+ sitem(tt(descriptors))(Maximum value for a file descriptor.)
sitem(tt(filesize))(Largest single file allowed.)
sitem(tt(maxproc))(Maximum number of processes.)
! sitem(tt(memorylocked))(Maximum amount of memory locked in RAM.)
! sitem(tt(memoryuse))(Maximum resident set size.)
! sitem(tt(resident))(Maximum resident set size.)
! sitem(tt(sktbuffersize))(Maximum size of all socket buffers.)
! sitem(tt(stacksize))(Maximum stack size for each process.)
! sitem(tt(vmemorysize))(Maximum amount of virtual memory.)
endsitem()
Which of these resource limits are available depends on the system.
diff -cr ../zsh-3.1.6-bart-7.old/Src/Builtins/rlimits.awk ./Src/Builtins/rlimits.awk
*** ../zsh-3.1.6-bart-7.old/Src/Builtins/rlimits.awk Thu Oct 14 04:21:55 1999
--- ./Src/Builtins/rlimits.awk Mon Oct 18 10:56:52 1999
***************
*** 6,12 ****
#
BEGIN {limidx = 0}
! /^[\t ]*(#[\t ]*define[\t _]*RLIMIT_[A-Z_]*[\t ]*[0-9][0-9]*|RLIMIT_[A-Z]*,[\t ]*)/ {
limindex = index($0, "RLIMIT_")
limtail = substr($0, limindex, 80)
split(limtail, tmp)
--- 6,12 ----
#
BEGIN {limidx = 0}
! /^[\t ]*(#[\t ]*define[\t _]*RLIMIT_[A-Z_]*[\t ]*[0-9][0-9]*|RLIMIT_[A-Z_]*,[\t ]*)/ {
limindex = index($0, "RLIMIT_")
limtail = substr($0, limindex, 80)
split(limtail, tmp)
***************
*** 22,42 ****
if (lim[limnum] == "") {
lim[limnum] = limnam
if (limnum ~ /^[0-9]*$/) {
! if (limnam == "MEMLOCK") { msg[limnum] = "memorylocked" }
! if (limnam == "RSS") { msg[limnum] = "resident" }
! if (limnam == "VMEM") { msg[limnum] = "vmemorysize" }
! if (limnam == "NOFILE") { msg[limnum] = "descriptors" }
! if (limnam == "OFILE") { msg[limnum] = "descriptors" }
! if (limnam == "CORE") { msg[limnum] = "coredumpsize" }
! if (limnam == "STACK") { msg[limnum] = "stacksize" }
! if (limnam == "DATA") { msg[limnum] = "datasize" }
! if (limnam == "FSIZE") { msg[limnum] = "filesize" }
! if (limnam == "CPU") { msg[limnum] = "cputime" }
! if (limnam == "NPROC") { msg[limnum] = "maxproc" }
! if (limnam == "AS") { msg[limnum] = "addressspace" }
! if (limnam == "TCACHE") { msg[limnum] = "cachedthreads" }
! if (limnam == "AIO_OPS") { msg[limnum] = "aiooperations" }
! if (limnam == "AIO_MEM") { msg[limnum] = "aiomemorylocked" }
}
}
}
--- 22,43 ----
if (lim[limnum] == "") {
lim[limnum] = limnam
if (limnum ~ /^[0-9]*$/) {
! if (limnam == "AIO_MEM") { msg[limnum] = "Maiomemorylocked" }
! if (limnam == "AIO_OPS") { msg[limnum] = "Naiooperations" }
! if (limnam == "AS") { msg[limnum] = "Maddressspace" }
! if (limnam == "CORE") { msg[limnum] = "Mcoredumpsize" }
! if (limnam == "CPU") { msg[limnum] = "Tcputime" }
! if (limnam == "DATA") { msg[limnum] = "Mdatasize" }
! if (limnam == "FSIZE") { msg[limnum] = "Mfilesize" }
! if (limnam == "MEMLOCK") { msg[limnum] = "Mmemorylocked" }
! if (limnam == "NOFILE") { msg[limnum] = "Ndescriptors" }
! if (limnam == "NPROC") { msg[limnum] = "Nmaxproc" }
! if (limnam == "OFILE") { msg[limnum] = "Ndescriptors" }
! if (limnam == "RSS") { msg[limnum] = "Mresident" }
! if (limnam == "SBSIZE") { msg[limnum] = "Msktbuffersize" }
! if (limnam == "STACK") { msg[limnum] = "Mstacksize" }
! if (limnam == "TCACHE") { msg[limnum] = "Ncachedthreads" }
! if (limnam == "VMEM") { msg[limnum] = "Mvmemorysize" }
}
}
}
***************
*** 54,74 ****
END {
if (limrev["MEMLOCK"] != "") {
irss = limrev["RSS"]
! msg[irss] = "memoryuse"
}
ps = "%s"
printf("%s\n%s\n\n", "/** rlimits.h **/", "/** architecture-customized limits for zsh **/")
! printf("#define ZSH_NLIMITS %d\n\nstatic char *recs[ZSH_NLIMITS+1] = {\n", 0 + nlimits)
for (i = 0; i < 0 + nlimits; i++)
! if (msg[i] == "") {
! badlimit++
printf("\t%c%s%c,\n", 34, lim[i], 34)
! } else
! printf("\t%c%s%c,\n", 34, msg[i], 34)
! print "\tNULL"
print "};"
print ""
! exit(badlimit)
}
--- 55,87 ----
END {
if (limrev["MEMLOCK"] != "") {
irss = limrev["RSS"]
! msg[irss] = "Mmemoryuse"
}
ps = "%s"
printf("%s\n%s\n\n", "/** rlimits.h **/", "/** architecture-customized limits for zsh **/")
! printf("#define ZSH_NLIMITS %d\n\nstatic char const *recs[ZSH_NLIMITS] = {\n", 0 + nlimits)
for (i = 0; i < 0 + nlimits; i++)
! if (msg[i] == "")
printf("\t%c%s%c,\n", 34, lim[i], 34)
! else
! printf("\t%c%s%c,\n", 34, substr(msg[i], 2, 30), 34)
print "};"
print ""
! print "static int limtype[ZSH_NLIMITS] = {"
! for (i = 0; i < 0 + nlimits; i++) {
! if (msg[i] == "")
! limtype = "UNKNOWN"
! else {
! limtype = substr(msg[i], 1, 1)
! if(limtype == "M") { limtype = "MEMORY" }
! if(limtype == "N") { limtype = "NUMBER" }
! if(limtype == "T") { limtype = "TIME" }
! }
! printf("\tZLIMTYPE_%s,\n", limtype)
! }
! print "};"
!
! exit(0)
}
diff -cr ../zsh-3.1.6-bart-7.old/Src/Builtins/rlimits.c ./Src/Builtins/rlimits.c
*** ../zsh-3.1.6-bart-7.old/Src/Builtins/rlimits.c Thu Oct 14 04:21:55 1999
--- ./Src/Builtins/rlimits.c Mon Oct 18 10:15:52 1999
***************
*** 32,37 ****
--- 32,44 ----
#if defined(HAVE_GETRLIMIT) && defined(RLIM_INFINITY)
+ enum {
+ ZLIMTYPE_MEMORY,
+ ZLIMTYPE_NUMBER,
+ ZLIMTYPE_TIME,
+ ZLIMTYPE_UNKNOWN
+ };
+
/* Generated rec array containing limits required for the limit builtin. *
* They must appear in this array in numerical order of the RLIMIT_* macros. */
***************
*** 85,106 ****
val = (hard) ? limits[rt].rlim_max : limits[rt].rlim_cur;
if (val == RLIM_INFINITY)
printf("unlimited\n");
! else if (rt==RLIMIT_CPU)
/* time-type resource -- display as hours, minutes and
seconds. */
printf("%d:%02d:%02d\n", (int)(val / 3600),
(int)(val / 60) % 60, (int)(val % 60));
! # ifdef RLIMIT_NPROC
! else if (rt == RLIMIT_NPROC)
! /* pure numeric resource */
! printf("%d\n", (int)val);
! # endif /* RLIMIT_NPROC */
! # ifdef RLIMIT_NOFILE
! else if (rt == RLIMIT_NOFILE)
/* pure numeric resource */
printf("%d\n", (int)val);
! # endif /* RLIMIT_NOFILE */
! else if (val >= 1024L * 1024L)
/* memory resource -- display with `K' or `M' modifier */
# ifdef RLIM_T_IS_QUAD_T
printf("%qdMB\n", val / (1024L * 1024L));
--- 92,106 ----
val = (hard) ? limits[rt].rlim_max : limits[rt].rlim_cur;
if (val == RLIM_INFINITY)
printf("unlimited\n");
! else if (limtype[rt] == ZLIMTYPE_TIME) {
/* time-type resource -- display as hours, minutes and
seconds. */
printf("%d:%02d:%02d\n", (int)(val / 3600),
(int)(val / 60) % 60, (int)(val % 60));
! } else if (limtype[rt] == ZLIMTYPE_NUMBER || limtype[rt] == ZLIMTYPE_UNKNOWN) {
/* pure numeric resource */
printf("%d\n", (int)val);
! } else if (val >= 1024L * 1024L)
/* memory resource -- display with `K' or `M' modifier */
# ifdef RLIM_T_IS_QUAD_T
printf("%qdMB\n", val / (1024L * 1024L));
***************
*** 297,303 ****
showlimits(hard, lim);
return 0;
}
! if (lim==RLIMIT_CPU) {
/* time-type resource -- may be specified as seconds, or minutes or *
* hours with the `m' and `h' modifiers, and `:' may be used to add *
* together more than one of these. It's easier to understand from *
--- 297,303 ----
showlimits(hard, lim);
return 0;
}
! if (limtype[lim] == ZLIMTYPE_TIME) {
/* time-type resource -- may be specified as seconds, or minutes or *
* hours with the `m' and `h' modifiers, and `:' may be used to add *
* together more than one of these. It's easier to understand from *
***************
*** 315,334 ****
return 1;
}
}
! }
! # ifdef RLIMIT_NPROC
! else if (lim == RLIMIT_NPROC)
/* pure numeric resource -- only a straight decimal number is
permitted. */
val = zstrtorlimt(s, &s, 10);
! # endif /* RLIMIT_NPROC */
! # ifdef RLIMIT_NOFILE
! else if (lim == RLIMIT_NOFILE)
! /* pure numeric resource -- only a straight decimal number is
! permitted. */
! val = zstrtorlimt(s, &s, 10);
! # endif /* RLIMIT_NOFILE */
! else {
/* memory-type resource -- `k' and `M' modifiers are permitted,
meaning (respectively) 2^10 and 2^20. */
val = zstrtorlimt(s, &s, 10);
--- 315,325 ----
return 1;
}
}
! } else if (limtype[lim] == ZLIMTYPE_NUMBER || limtype[lim] == ZLIMTYPE_UNKNOWN) {
/* pure numeric resource -- only a straight decimal number is
permitted. */
val = zstrtorlimt(s, &s, 10);
! } else {
/* memory-type resource -- `k' and `M' modifiers are permitted,
meaning (respectively) 2^10 and 2^20. */
val = zstrtorlimt(s, &s, 10);
Only in ./Src/Builtins: rlimits.h
diff -cr ../zsh-3.1.6-bart-7.old/Src/Builtins/rlimits.mdd ./Src/Builtins/rlimits.mdd
*** ../zsh-3.1.6-bart-7.old/Src/Builtins/rlimits.mdd Mon Jun 1 18:08:45 1998
--- ./Src/Builtins/rlimits.mdd Mon Oct 18 10:31:00 1999
***************
*** 5,16 ****
:<<\Make
rlimits.o rlimits..o: rlimits.h
! # this file will not be made if limits are unavailable:
! # silent so the warning doesn't appear unless necessary
rlimits.h: rlimits.awk @RLIMITS_INC_H@
! @echo '$(AWK) -f $(sdir)/rlimits.awk @RLIMITS_INC_H@ > rlimits.h'; \
! $(AWK) -f $(sdir)/rlimits.awk @RLIMITS_INC_H@ > rlimits.h || \
! echo WARNING: unknown limits: mail rlimits.h to developers
clean-here: clean.rlimits
clean.rlimits:
--- 5,16 ----
:<<\Make
rlimits.o rlimits..o: rlimits.h
! # this file will not be made if limits are unavailable
rlimits.h: rlimits.awk @RLIMITS_INC_H@
! $(AWK) -f $(sdir)/rlimits.awk @RLIMITS_INC_H@ > rlimits.h
! @if grep ZLIMTYPE_UNKNOWN rlimits.h >/dev/null; then \
! echo >&2 WARNING: unknown limits: mail rlimits.h to developers; \
! else :; fi
clean-here: clean.rlimits
clean.rlimits:
END
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About to release 3.0.7 ...
1999-10-18 10:16 ` About to release 3.0.7 Zefram
@ 1999-10-18 15:48 ` Bart Schaefer
1999-10-18 19:52 ` Jos Backus
0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 1999-10-18 15:48 UTC (permalink / raw)
To: Zefram; +Cc: zsh-workers
On Oct 18, 11:16am, Zefram wrote:
} Subject: Re: About to release 3.0.7 ...
}
} Jos Backus wrote:
} >+ if (limnam == "SBSIZE") { msg[limnum] = "sbsize" }
}
} This is not a good name. zsh's resource limit names tend to be more
} verbose, so you don't need to know the system to see what is being
} limited. I suggest the name "sktbuffersize".
It'd be more unixy to use "sockbufsize"; the common abbreviations are
"sock" and "buf" as in setbuf() and setsockopt(). I don't think I've
ever seen the abbreviation "skt" before. Objections?
Index: Doc/Zsh/builtins.yo
===================================================================
@@ -524,7 +524,7 @@
sitem(tt(memorylocked))(Maximum amount of memory locked in RAM.)
sitem(tt(memoryuse))(Maximum resident set size.)
sitem(tt(resident))(Maximum resident set size.)
-sitem(tt(sktbuffersize))(Maximum size of all socket buffers.)
+sitem(tt(sockbufsize))(Maximum size of all socket buffers.)
sitem(tt(stacksize))(Maximum stack size for each process.)
sitem(tt(vmemorysize))(Maximum amount of virtual memory.)
endsitem()
Index: Src/Builtins/rlimits.awk
===================================================================
@@ -34,7 +34,7 @@
if (limnam == "NPROC") { msg[limnum] = "Nmaxproc" }
if (limnam == "OFILE") { msg[limnum] = "Ndescriptors" }
if (limnam == "RSS") { msg[limnum] = "Mresident" }
- if (limnam == "SBSIZE") { msg[limnum] = "Msktbuffersize" }
+ if (limnam == "SBSIZE") { msg[limnum] = "Msockbufsize" }
if (limnam == "STACK") { msg[limnum] = "Mstacksize" }
if (limnam == "TCACHE") { msg[limnum] = "Ncachedthreads" }
if (limnam == "VMEM") { msg[limnum] = "Mvmemorysize" }
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: About to release 3.0.7 ...
1999-10-18 15:48 ` Bart Schaefer
@ 1999-10-18 19:52 ` Jos Backus
0 siblings, 0 replies; 6+ messages in thread
From: Jos Backus @ 1999-10-18 19:52 UTC (permalink / raw)
To: Bart Schaefer; +Cc: Zefram, zsh-workers
On Mon, Oct 18, 1999 at 03:48:27PM +0000, Bart Schaefer wrote:
> It'd be more unixy to use "sockbufsize"; the common abbreviations are
> "sock" and "buf" as in setbuf() and setsockopt(). I don't think I've
> ever seen the abbreviation "skt" before. Objections?
Good idea. I was about to make the same suggestion.
--
Jos Backus _/ _/_/_/ "Reliability means never
_/ _/ _/ having to say you're sorry."
_/ _/_/_/ -- D. J. Bernstein
_/ _/ _/ _/
Jos.Backus@nl.origin-it.com _/_/ _/_/_/ use Std::Disclaimer;
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1999-10-18 23:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-17 21:26 About to release 3.0.7 Bart Schaefer
1999-10-17 23:46 ` Jos Backus
1999-10-18 4:30 ` "limit sbsize" Bart Schaefer
1999-10-18 10:16 ` About to release 3.0.7 Zefram
1999-10-18 15:48 ` Bart Schaefer
1999-10-18 19:52 ` Jos Backus
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).