address space available to processes. this limit exists in most other
modern unix variants, and like most of them, our defaults are unlimited.
remove the old mmap / rlimit.datasize hack.
- adds the VMCMD_STACK flag to all the stack-creation vmcmd callers.
it is currently unused, but was added a few years ago.
- add a pair of new process size values to kinfo_proc2{}. one is the
total size of the process memory map, and the other is the total size
adjusted for unused stack space (since most processes have a lot of
this...)
- patch sh, and csh to notice RLIMIT_AS. (in some cases, the alias
RLIMIT_VMEM was already present and used if availble.)
- patch ps, top and systat to notice the new k_vm_vsize member of
kinfo_proc2{}.
- update irix, svr4, svr4_32, linux and osf1 emulations to support
this information. (freebsd could be done, but that it's best left
as part of the full-update of compat/freebsd.)
this addresses PR 7897. it also gives correct memory usage values,
which have never been entirely correct (since mmap), and have been
very incorrect since jemalloc() was enabled.
tested on i386 and sparc64, build tested on several other platforms.
thanks to many folks for feedback and testing but most espcially
chuq and yamt for critical suggestions that lead to this patch not
having a special ugliness i wasn't happy with anyway :-)
between a NULL string and an error.
This fixes sh from exiting with libedit now allowing EINTR to return.
We may need to expand this to an errno check in the future.
constructs like ${var%$nl}. Apparently this allows the Ubuntu Linux
/bin/sh (dash) to be used as a host shell during the build.
Patch from PR 39786 by Andy Shevchenko.
in a suitable ifdef, so things still compile if STATIC is defined as
"static", which is for some reason not the default.
(In the long run STATIC should go away - it might have once been a
portability hack but now definitely serves no purpose.)
builtins such as the printf command), then hide a few declarations.
This allows the shell to build again, fixing a problem with
"error" being declared as a function here, and as a variable in
.../usr.bin/printf/printf.c.
symbols if appropriate. For example, error.h will use it to hide
declarations that should not be seen by external builtins such as printf.
* The shell's outfmt() function returns void, but the standard fprintf()
function returns int. Similarly for several other functions that are
redefined via macros in bltin.h. Add a _RETURN_INT macro to do the
necessary conversion.
* Delete some declarations that appear in error.h.
* Add comments on some #else/#endif lines.