diff options
| author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-14 13:19:57 +1000 |
|---|---|---|
| committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2010-09-14 13:19:57 +1000 |
| commit | ec71cb6575290eb6ad716e4f620db445d8e1bcd3 (patch) | |
| tree | 219a5dba000e0ad98ff563bc6f7d45d274d3a178 /shell/shell_common.c | |
| parent | b5139d7cd8982d9b683cb1babf0bd759076aaab0 (diff) | |
| parent | 6814cbc9288601840aedb372e2bd84dab76ffa43 (diff) | |
| download | busybox-w32-ec71cb6575290eb6ad716e4f620db445d8e1bcd3.tar.gz busybox-w32-ec71cb6575290eb6ad716e4f620db445d8e1bcd3.tar.bz2 busybox-w32-ec71cb6575290eb6ad716e4f620db445d8e1bcd3.zip | |
Merge branch 'origin/master' (early part)
Diffstat (limited to 'shell/shell_common.c')
| -rw-r--r-- | shell/shell_common.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/shell/shell_common.c b/shell/shell_common.c index 840e03bff..957d71928 100644 --- a/shell/shell_common.c +++ b/shell/shell_common.c | |||
| @@ -435,9 +435,14 @@ shell_builtin_ulimit(char **argv) | |||
| 435 | val <<= l->factor_shift; | 435 | val <<= l->factor_shift; |
| 436 | } | 436 | } |
| 437 | //bb_error_msg("opt %c val_str:'%s' val:%lld", opt_char, val_str, (long long)val); | 437 | //bb_error_msg("opt %c val_str:'%s' val:%lld", opt_char, val_str, (long long)val); |
| 438 | /* from man bash: "If neither -H nor -S | ||
| 439 | * is specified, both the soft and hard | ||
| 440 | * limits are set. */ | ||
| 441 | if (!opts) | ||
| 442 | opts = OPT_hard + OPT_soft; | ||
| 438 | if (opts & OPT_hard) | 443 | if (opts & OPT_hard) |
| 439 | limit.rlim_max = val; | 444 | limit.rlim_max = val; |
| 440 | if ((opts & OPT_soft) || opts == 0) | 445 | if (opts & OPT_soft) |
| 441 | limit.rlim_cur = val; | 446 | limit.rlim_cur = val; |
| 442 | //bb_error_msg("setrlimit(%d, %lld, %lld)", l->cmd, (long long)limit.rlim_cur, (long long)limit.rlim_max); | 447 | //bb_error_msg("setrlimit(%d, %lld, %lld)", l->cmd, (long long)limit.rlim_cur, (long long)limit.rlim_max); |
| 443 | if (setrlimit(l->cmd, &limit) < 0) { | 448 | if (setrlimit(l->cmd, &limit) < 0) { |
