diff options
author | Daniel Shahaf <danielsh@apache.org> | 2020-03-07 21:36:46 +0000 |
---|---|---|
committer | Daniel Shahaf <danielsh@apache.org> | 2020-03-07 21:36:46 +0000 |
commit | 6fc8e8628f9c3da6e4b83c3de67e44376708cbcb (patch) | |
tree | c711b1d53564bcca757799e1d734e24859c5f32e /Src/Builtins/rlimits.awk | |
parent | 0d3d07c56f75064310271bf4469c5c9c13145d58 (diff) | |
parent | dd50f125b5eb65896642d2ff664adefd33f1004c (diff) | |
download | zsh-6fc8e8628f9c3da6e4b83c3de67e44376708cbcb.tar.gz zsh-6fc8e8628f9c3da6e4b83c3de67e44376708cbcb.tar.xz zsh-6fc8e8628f9c3da6e4b83c3de67e44376708cbcb.zip |
Merge remote-tracking branch 'origin/master' into 5.9
* Test/D02glob.ztst: On the "unreadable directories can be globbed (users/24619, users/24626)" test, resolve conflicts by removing the Cygwin-only skip that has been added in master, since the test is passing on this branch. This effectively reverts workers/45492. See discussion starting in workers/45504. * origin/master: unposted: Remove 'sgi', as that OpenBSD port has been discontinued. 45509: fix typos in B01cd.ztst 45490 (+45495 and a test): refactor rlimits.c github #49: Fix typo: longson should be loongson users/24710: Fix job control problem with sudo. 45492: skip test added by users/24633 on Cygwin 45488: COMP_WORDS for bash need "$@"-style quoting 45487: Missing mod_export declarations for AIX 45447: Complete vcs_info_hookadd and vcs_info_hookdel. Expose _vcs_info_hooks as a top-level helper function. 45463: test: kill: Document why we use SIGURG 45453: builtins: kill: Do not signal current process group when pid is empty 45452: builtins: kill: Add `kill ''` regression test with explicit sigspec 45451: builtins: kill: Add basic test suite github #48/0002: vcs_info git: properly detect bare repositories github #48/0001: vcs_info git: avoid warnings in bare repositories unposted: Post-release version bump unposted: Release 5.8 CVE-2019-20044: Update change log for preceding commits Update NEWS/README Add unsetopt/PRIVILEGED tests Clean up error-message white space Improve PRIVILEGED fixes (again) Improve PRIVILEGED fixes Drop privileges securely unposted: V01zmodload: Fix failing test from workers/45385 45423: _su: Improve arg handling, shell look-ups unposted: _zip: Recognise '--' 45385: Add a test for 'zmodload -Fa' preemptively disabling ("blacklisting"?) features. unposted: Test release: 5.7.1-test-3 zsh/system: Fix infinite loop in sysread _diff_options: Restore -w completion lost in workers/43351 unposted: Fix ChangeLog typo. 45368: Add tests for workers/45367's issue about double slashes in 'cd -P' and /home/daniel/in/zsh. 45373: Fix ERR_EXIT bug in else branch of if. 45372: Record a symlink loop bug involving :P 45365: _git: Fix __git_recent_branches for the case when a commit has an empty message 45343: Queue signals around arithmetic evaluations 45344: Document where third-party completion functions should be installed. 45345: internal: ztst.vim: Fix highlighting of zsh comments in test payload unposted: internal: Add some comments and fix indentation. No functional change. 45340: internal: Document the difference between paramtab and realparamtab. 45332: _git: add completion for git-version _brace_parameter: add missing \ Conflicts: ChangeLog Test/D02glob.ztst Test/V01zmodload.ztst
Diffstat (limited to 'Src/Builtins/rlimits.awk')
-rw-r--r-- | Src/Builtins/rlimits.awk | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/Src/Builtins/rlimits.awk b/Src/Builtins/rlimits.awk deleted file mode 100644 index e9c576c66..000000000 --- a/Src/Builtins/rlimits.awk +++ /dev/null @@ -1,116 +0,0 @@ -# -# rlimits.awk: {g,n}awk script to generate rlimits.h -# -# NB: On SunOS 4.1.3 - user-functions don't work properly, also \" problems -# Without 0 + hacks some nawks compare numbers as strings -# -BEGIN {limidx = 0} - -/^[\t ]*(#[\t ]*define[\t _]*RLIMIT_[A-Z_]*[\t ]*[0-9][0-9]*|RLIMIT_[A-Z_]*,[\t ]*|_*RLIMIT_[A-Z_]*[\t ]*=[\t ]*[0-9][0-9]*,[\t ]*)/ { - limindex = index($0, "RLIMIT_") - limtail = substr($0, limindex, 80) - split(limtail, tmp) - limnam = substr(tmp[1], 8, 20) - limnum = tmp[2] - # in this case I assume GNU libc resourcebits.h - if (limnum == "") { - limnum = limidx++ - limindex = index($0, ",") - limnam = substr(limnam, 1, limindex-1) - } - if (limnum == "=") { - if (tmp[3] ~ /^[0-9]/) { - limnum = tmp[3] + 0 - } else { - limnum = limidx++ - } - limindex = index($0, ",") - limnam = substr(limnam, 1, limindex-1) - } - limrev[limnam] = limnum - 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 == "LOCKS") { msg[limnum] = "Nmaxfilelocks" } - if (limnam == "MEMLOCK") { msg[limnum] = "Mmemorylocked" } - if (limnam == "NOFILE") { msg[limnum] = "Ndescriptors" } - if (limnam == "NPROC") { msg[limnum] = "Nmaxproc" } - if (limnam == "NTHR") { msg[limnum] = "Nmaxpthreads" } - if (limnam == "OFILE") { msg[limnum] = "Ndescriptors" } - if (limnam == "PTHREAD") { msg[limnum] = "Nmaxpthreads" } - if (limnam == "RSS") { msg[limnum] = "Mresident" } - if (limnam == "SBSIZE") { msg[limnum] = "Msockbufsize" } - if (limnam == "STACK") { msg[limnum] = "Mstacksize" } - if (limnam == "TCACHE") { msg[limnum] = "Ncachedthreads" } - if (limnam == "VMEM") { msg[limnum] = "Mvmemorysize" } - if (limnam == "SIGPENDING") { msg[limnum] = "Nsigpending" } - if (limnam == "MSGQUEUE") { msg[limnum] = "Nmsgqueue" } - if (limnam == "NICE") { msg[limnum] = "Nnice" } - if (limnam == "RTPRIO") { msg[limnum] = "Nrt_priority" } - if (limnam == "RTTIME") { msg[limnum] = "Urt_time" } - if (limnam == "POSIXLOCKS") { msg[limnum] = "Nposixlocks" } - if (limnam == "NPTS") { msg[limnum] = "Npseudoterminals" } - if (limnam == "SWAP") { msg[limnum] = "Mswapsize" } - if (limnam == "KQUEUES") { msg[limnum] = "Nkqueues" } - if (limnam == "UMTXP") { msg[limnum] = "Numtxp" } - } - } -} -/^[\t ]*#[\t ]*define[\t _]*RLIM_NLIMITS[\t ]*[0-9][0-9]*/ { - limindex = index($0, "RLIM_") - limtail = substr($0, limindex, 80) - split(limtail, tmp) - nlimits = tmp[2] -} -# in case of GNU libc -/^[\t ]*RLIM_NLIMITS[\t ]*=[\t ]*RLIMIT_NLIMITS/ { - if(!nlimits) { nlimits = limidx } -} -/^[\t _]*RLIM(IT)?_NLIMITS[\t ]*=[\t ]*[0-9][0-9]*/ { - limindex = index($0, "=") - limtail = substr($0, limindex, 80) - split(limtail, tmp) - nlimits = tmp[2] -} - -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" } - if(limtype == "U") { limtype = "MICROSECONDS" } - } - printf("\tZLIMTYPE_%s,\n", limtype) - } - print "};" - - exit(0) -} |