diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:11:42 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:11:42 +0000 |
commit | 20d67907c95265356b51dbdce8ecc0c1ede9e66b (patch) | |
tree | 69b0777db02f96555b3a0587cd630025062a7f09 /Src/Builtins | |
parent | 2a5a899a55fd2bce10efd01c75a4bec5285aa46c (diff) | |
download | zsh-20d67907c95265356b51dbdce8ecc0c1ede9e66b.tar.gz zsh-20d67907c95265356b51dbdce8ecc0c1ede9e66b.tar.xz zsh-20d67907c95265356b51dbdce8ecc0c1ede9e66b.zip |
zsh-3.1.5-pws-5 zsh-3.1.5-pws-5
Diffstat (limited to 'Src/Builtins')
-rw-r--r-- | Src/Builtins/rlimits.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Src/Builtins/rlimits.c b/Src/Builtins/rlimits.c index 31dcb71b1..2af8dc6ac 100644 --- a/Src/Builtins/rlimits.c +++ b/Src/Builtins/rlimits.c @@ -264,7 +264,7 @@ bin_limit(char *nam, char **argv, char *ops, int func) * together more than one of these. It's easier to understand from * * the code: */ val = zstrtorlimt(s, &s, 10); - if (*s) + if (*s) { if ((*s == 'h' || *s == 'H') && !s[1]) val *= 3600L; else if ((*s == 'm' || *s == 'M') && !s[1]) @@ -275,6 +275,7 @@ bin_limit(char *nam, char **argv, char *ops, int func) zwarnnam("limit", "unknown scaling factor: %s", s, 0); return 1; } + } } # ifdef RLIMIT_NPROC else if (lim == RLIMIT_NPROC) @@ -339,12 +340,12 @@ bin_unlimit(char *nam, char **argv, char *ops, int func) /* Without arguments, remove all limits. */ if (!*argv) { for (limnum = 0; limnum != RLIM_NLIMITS; limnum++) { - if (hard) + if (hard) { if (euid && current_limits[limnum].rlim_max != RLIM_INFINITY) ret++; else limits[limnum].rlim_max = RLIM_INFINITY; - else + } else limits[limnum].rlim_cur = limits[limnum].rlim_max; } if (ops['s']) @@ -373,13 +374,13 @@ bin_unlimit(char *nam, char **argv, char *ops, int func) return 1; } /* remove specified limit */ - if (hard) + if (hard) { if (euid && current_limits[lim].rlim_max != RLIM_INFINITY) { zwarnnam(nam, "can't remove hard limits", NULL, 0); ret++; } else limits[lim].rlim_max = RLIM_INFINITY; - else + } else limits[lim].rlim_cur = limits[lim].rlim_max; if (ops['s'] && zsetlimit(lim, nam)) ret++; @@ -478,11 +479,12 @@ bin_ulimit(char *name, char **argv, char *ops, int func) } } if (!*argv || **argv == '-') { - if (res < 0) + if (res < 0) { if (*argv || nres) continue; else res = RLIMIT_FSIZE; + } resmask |= 1 << res; nres++; continue; |