Commit Graph

216 Commits

Author SHA1 Message Date
wiz 7d6100a52d Bump date for previous. 2009-03-29 08:54:10 +00:00
mrg fcc023545e - add new RLIMIT_AS (aka RLIMIT_VMEM) resource that limits the total
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 :-)
2009-03-29 01:02:48 +00:00
joerg 51c2955e45 Use .Rs/.Re for reference to C shell introduction. 2009-03-13 14:07:54 +00:00
wiz 9a3995e433 Remove weird backslash that somehow must have crept in.
Found by joerg and mdocml.
2009-03-03 15:11:29 +00:00
lukem 9050ab5cfa fix -Wsign-compare issues 2009-02-14 07:12:29 +00:00
abs 0c7bdeb6b8 Use u_int counter to count from 0 to u_int: for (u = 0; u < digits; u++) 2009-02-13 00:46:25 +00:00
apb f46c1de7cb Use ${TOOL_SED} instead if plain sed in Makefiles. 2008-10-25 22:27:34 +00:00
gmcgarry 3c9a95916d Wrap compiler-specific flags with HAVE_GCC and HAVE_PCC as necessary. Add a few flags for PCC. 2008-08-29 00:02:21 +00:00
lukem 2fe2731d3f Remove the \n and tabs from the __COPYRIGHT() strings. 2008-07-20 00:52:39 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
dholland 8392979dd5 Dividing by a time_t makes the result time_t, so it should be cast to long
when being printf'd as a long.
2008-02-24 05:20:17 +00:00
perry 0c0bc4573a __attribute__((__noreturn__)) to __dead 2007-12-24 16:11:50 +00:00
perry 8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
lukem bcf893f432 use __RCSID() 2007-12-12 22:55:42 +00:00
tls 54aef6aada Rename "csh.a" (the appendix of the document) to csh.ap: the .a suffix
is a bit of a nuisance when using cvs import and export and, of course,
clashes with .a for library archive as well.
2007-10-18 18:26:31 +00:00
ragge 8b19d01fcd Needs errno.h if !gcc. 2007-09-15 14:33:05 +00:00
christos b79c2ef26a no need to have cshbool; just make them int 2007-07-16 18:26:09 +00:00
christos ec01a4a425 PR/36650: Michael van Elst: Get rid of bool, because csh uses bool as a small
int.
2007-07-16 14:07:00 +00:00
dogcow 593a9183f0 Rename bool -> cshbool; despite the name, bool actually holds values other
than 0 or 1. Fixes PR/36650.
2007-07-16 02:26:50 +00:00
dogcow 7b060c43f2 exposure of bool elsewhere in the code requires the addition of stdbool;
in addition, proc.c cleverly has a variable that was initially defined "int",
but had in the actual declaration "bool". oops.
2007-07-10 00:30:23 +00:00
msaitoh 8ce1f4fff2 fix typos 2007-04-29 20:23:34 +00:00
matt 271dc0c3c3 No functional changes. Cleanup time printing code so it can be used
elsewhere in the tree.
2007-02-24 21:29:13 +00:00
christos 88e26c5a37 sprinkle volatile 2006-10-15 23:57:21 +00:00
mrg 334f3f5949 apply a little -O0 with GCC4 and vax... 2006-07-01 05:54:35 +00:00
christos a7679aa75e Fix two uninitialized variables with XXX: GCC. 2006-05-14 01:05:42 +00:00
christos 2701e5b9be Coverity CID 3330: Initialize uninitialized variable. 2006-05-13 21:22:32 +00:00
christos 78b76e5792 Coverity CID 3331: Remove impossible test. 2006-05-13 21:18:57 +00:00
mrg 4d375f236f rename exp2() to csh_exp2(). (bah, we don't even have an exp2()) 2006-05-10 21:14:48 +00:00
snj a640fe8c43 It's "its." 2006-04-24 19:00:29 +00:00
christos 0346684a3d save the home directory. 2006-04-05 23:10:16 +00:00
christos 0c6d11b6a4 Coverity CID 2736: Remove 16 bit int compat code. 2006-03-21 16:46:44 +00:00
christos 3cf8c179a3 Coverity CID 1763: Plug memory leak. 2006-03-18 07:09:08 +00:00
christos e889898c95 Coverity CID 1766: Plug memory leak. 2006-03-18 07:02:16 +00:00
christos f3ffb9c969 Coverity CID 1760: Plug memory leak. 2006-03-18 06:54:46 +00:00
christos 4d7c6251da Coverity CID 1228: protect against calling close with negative value. 2006-03-18 06:29:21 +00:00
christos dcfc467f4d Coverity CID 872: Possible NULL deref. 2006-03-18 06:24:26 +00:00
christos 5653b43bfd Coverity CID 1226: Remove bogus close call. 2006-03-17 22:48:10 +00:00
christos 1006977549 Coverity CID 1324: Check adrof return; not really possible. 2006-03-17 22:38:44 +00:00
christos b807e41c56 Coverity CID 1762. Fix resource leak. 2006-03-17 22:24:28 +00:00
christos 94f9c01465 Coverity CID 610: Dead code 2006-03-17 22:20:31 +00:00
dmcmahill 3ebb7ce790 Correct a check for an index being in bounds for a static array. 2006-03-17 00:02:30 +00:00
christos 6310b59691 sprinkle a little const, and now everything compiles with WARNS=3 2005-06-26 19:10:48 +00:00
xtraeme 06bca8b1ce Kill __P(). 2005-02-17 16:07:53 +00:00
christos d12e6436f9 Don't forget to FIOCLEX the internal copies of stdout,stderr,stddiag when
we invoke a subshell. Otherwise the executed command gets invoked with
17,18,19 open.
2004-09-28 16:07:01 +00:00
christos 287d684b47 Deal with RESCUE 2004-08-19 22:31:38 +00:00
christos 626d1a4171 Keep track of the while level, when popping loops because of a breaksw.
This is nasty...
2004-05-13 15:25:58 +00:00
christos d24b172c21 avoid overflow in strcpy. 2004-05-10 19:11:31 +00:00
jschauma 9bb0acaf30 The correct syntax for csh's pushd with a numeric argument is
pushd +n
not
pushd n
2004-04-20 01:43:03 +00:00
wiz ae25ed4085 Document rlimit sbsize; case consistency; bump date. 2004-04-17 15:45:08 +00:00
christos 6acf809e53 understand rlimit sbsize 2004-04-17 15:40:12 +00:00