Commit Graph

231 Commits

Author SHA1 Message Date
christos
8af1ed165c support RLIMIT_NTHR 2012-06-09 02:50:43 +00:00
wiz
3957bea1ef Fix whitespace nits. Suggested by Bug Hunting. 2012-03-22 07:58:16 +00:00
christos
1897181a72 From tnozaki@: make fpos_t a complex object that keeps track of the parse
state of the stream. Change argument of the seek function to funopen() from
fpos_t to off_t. Make f{g,s}etpos() use the new fpos_t struct, while providing
backwards compatible entry points. Approved by releng@
2012-01-22 18:36:14 +00:00
christos
09838d02ff PR/45856: Bernhard "Burnhard" Riedel: Infinite loop on   input. Sending
char 160 in the input to csh, lead it to an infinite loop, because tcsh tables
counted this as a space character, but the word logic switch does not. Change
that character tables, so that this does not count as a spacing character
anymore, by syncing the table with the one from tcsh.
2012-01-19 02:42:53 +00:00
christos
c4753f0f6f sync with /usr/bin/time, use CLOCK_MONOTONIC 2011-11-09 19:16:00 +00:00
christos
03561a047f csh has no business using TTYHOG 2011-09-24 14:44:11 +00:00
plunky
9f61b80465 NULL does not need a cast 2011-08-31 16:24:54 +00:00
joerg
5bb1ddccc2 Use __dead 2011-08-29 14:51:17 +00:00
christos
bc4c3c5734 use strpct(3) from libutil. 2011-08-28 07:49:16 +00:00
joerg
0bb547d3b0 Uses non-literal format strings in err.c 2011-08-25 15:44:51 +00:00
christos
fe8677c354 Document non-literal formats 2011-08-14 10:53:16 +00:00
mrg
e7c388dbdf add a comment to confirm a workaround as only being a GCC 4.1 issue. 2011-07-01 03:58:10 +00:00
njoly
ef6127c9f2 Fix sub-section references. 2011-03-09 22:26:36 +00:00
joerg
899808a54d Use .In instead of .Aq .Pa for signal.h. 2010-03-22 18:33:27 +00:00
wiz
4eb4d50caa Match curly braces in undef(FILEC) case. Found by cppcheck. 2010-01-17 12:15:36 +00:00
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