Commit Graph

1458 Commits

Author SHA1 Message Date
David Malone
0567678261 Remove double #include <sys/cdef.h> and __FBSDID.
PR:		40053
Submitted by:	Dan Lukes <dan@obluda.cz>
2002-07-01 10:46:39 +00:00
Tim J. Robbins
90f72c844e Put documentation of the -m option's argument in its list tag in the
Description section for consistency with other manpages.
2002-06-30 06:50:16 +00:00
David E. O'Brien
e026a48c34 Consistently use FBSDID 2002-06-30 05:25:07 +00:00
David E. O'Brien
2749b14129 Consistently use FBSDID 2002-06-30 05:15:05 +00:00
David E. O'Brien
5eb43ac2f7 Consistently use __FBSDID 2002-06-30 05:13:54 +00:00
Tim J. Robbins
88485b4a2f Avoid truncating the pathname to UNIX Domain Sockets with snprintf(),
giving a more sensible warning when the (relatively meagre) sun_path
limit is exceeded.
2002-06-29 04:52:33 +00:00
Tim J. Robbins
a24ce1c859 Check that snprintf() does not truncate the destination pathname when
linking into a directory.
2002-06-29 04:10:40 +00:00
Sheldon Hearn
62df9b6286 Document addition of RLIMIT_VMEM support, added in rev 1.26 of miscbltin.c. 2002-06-27 16:56:45 +00:00
Matthew Dillon
085b9f3eb2 Add support for RLIMIT_VMEM. The #ifdef's were already there but getopt()
needed to be adjusted.
2002-06-26 00:29:53 +00:00
Tim J. Robbins
bdb9494ae8 ln(1)'s symbolic link handling conforms to IEEE Std. 1003.1-2001, note
this in the Standards section.
2002-06-25 10:02:12 +00:00
Tim J. Robbins
9c24ed854c Correctly mark up the final command line arguments with the Ar macro for
the last two synopsis forms.
2002-06-25 09:58:29 +00:00
Giorgos Keramidas
09152a86ff Add a description of the restrictions that red(1) imposes to users,
and a warning that this "restricted mode" can be bypassed easily by
using symlinks, so that users don't depend too much on it.

PR:		docs/35940
Submitted by:	Gary W. Swearingen <swear@blarg.net>
Reviewed by:	jmallett
MFC after:	1 week
2002-06-24 22:06:47 +00:00
Maxim Sobolev
41623b2d75 Don't try to decode old-style options if the argv[1] begins with `-' and the
second character represents some option taking an argument. This fixes
problem when ps(1) is invoked for examply as follows:

$ ps -Ufoobar1234

the above example results in option string being interpreted as
-U foobarp1234 - note extra `p'.

Reported by:	Vladimir Sotnikov <vovan@kyivstar.net>
MFC after:	2 weeks
2002-06-20 14:55:53 +00:00
Juli Mallett
49d54362f1 Bogusness may have happened using a variable assignment here before, but
proper parens mean that fd is always set by open(2) [in any part of C],
and so we can accurately check for it returning -1, without feeling like
we need to initialise fd to -1 in its declaration.

In other words, fix a stylistic/bogus nit.
2002-06-20 07:15:55 +00:00
Juli Mallett
6953dff37c Use size_t consistently and complete some uncompleted code resulting in a
memory leak by assigning and freeing a variable appropriately as well as
keeping track of the amount of allocated ram properly.

MFC after:	1 month
2002-06-20 06:00:51 +00:00
Juli Mallett
0e6c085ae6 We have a place for extern declarations of global variables in ed.h, do not
use main() to do it locally.
2002-06-20 05:28:02 +00:00
Juli Mallett
4e17884ffe Remove two unused variables. 2002-06-20 05:21:43 +00:00
Juli Mallett
8b7808bc49 Minor const cleanup.
Don't discard qualifiers we don't need to discard.
2002-06-20 05:20:50 +00:00
Tim J. Robbins
029c8ee4fa Bring documentation on CDPATH and its effects on cd(1) back into sync with
reality (and POSIX): current directory isn't searched unless CDPATH has
a "." element or is unset.

PR:		38442
Submitted by:	oleg dashevskii <be9@be9.ru>
MFC after:	1 week
2002-06-19 12:04:22 +00:00
Tim J. Robbins
9a81395d08 When trying to emulate a cross-device move operation with cp and rm, add
a "--" argument after the options so filenames with leading dashes are
handled correctly.

PR:		39318
Submitted by:	Serge van den Boom <svdb@stack.nl>
MFC after:	1 week
2002-06-16 04:06:58 +00:00
Juli Mallett
ca2be2ff45 Use an usage() rather than doing the fprintf inside option parsing. 2002-06-14 09:54:48 +00:00
Tim J. Robbins
f9dc2a8b93 When -R is not specified, fail to copy the contents of dangling symlinks
instead of making a copy of the link itself (SUSv3)

Obtained from:	NetBSD
2002-06-13 15:48:36 +00:00
Tim J. Robbins
bf5f0c446e Print the "$" symbol on blank lines when the -s and -e options are used
together.

Obtained from:	OpenBSD (millert, Denis Afonin)
2002-06-13 14:05:26 +00:00
Tim J. Robbins
99cc224074 Remove bogus "-" operand from usage message. There is no restriction on
where it may be placed, it is treated the same as the file arguments.
2002-06-13 13:45:14 +00:00
Tim J. Robbins
993895ac33 Markup nits: use the Ar macro when describing the -signal_name and
-signal_number options, and for referring to the "pid" argument.
2002-06-13 08:46:01 +00:00
Tim J. Robbins
16a6357c9b Add examples and diagnostics sections 2002-06-13 08:40:01 +00:00
Tim J. Robbins
08de34ac01 Support the "--" end of options marker, useful to disambiguate between
signal numbers and process groups (negative pid arguments), and
required by SUSv3.
2002-06-13 08:07:20 +00:00
Tim J. Robbins
83952a118b Don't list shell builtins when the hash command is used (SUSv3) 2002-06-13 07:50:50 +00:00
Juli Mallett
7140a0e9f1 ps(1) appeared in v4
Submitted by:	grog
2002-06-10 22:48:51 +00:00
Tim J. Robbins
43d088bea2 Sort sections, use Ex macro in Diagnostics section, point out that the first
example only works with csh(1).
2002-06-10 09:33:15 +00:00
Tim J. Robbins
91c0081804 Add History section. sleep appeared in v4. 2002-06-10 09:07:22 +00:00
Juli Mallett
a13d4e42c2 Note early appearence of some commands. These actually appeared in PWB, but
it seems we don't have a macro for that yet, so list them in the first UNIX
release since then that we have a .At for: v7.
2002-06-10 05:03:20 +00:00
Giorgos Keramidas
e02ef09616 Use socklen_t for the length of a socket structure instead of `int'.
Reviewed by:	mike
2002-06-09 04:18:45 +00:00
Giorgos Keramidas
a7c1ac2f62 Replace <strings.h> with <string.h>. No functions from the former are
used in this file, and strlen() needs to be prototyped by the latter,
for this to compile without warnings.

Reviewed by:	mike
2002-06-09 04:15:40 +00:00
Mike Barcroft
f3a09c6c9b Check the return value of getcwd() to avoid printf()ing a NULL. Mark
usage() as __dead2 to avoid a GCC warning.

Spotted by:	keramida
2002-06-09 00:46:24 +00:00
Juli Mallett
2dda9fe910 Allow whitespace to act as a delimiter in the keywords list given to the -o,
again, but also allow it in the user-specified header, too.  This is far more
backwards compatible and SUSv3-happy than allowing only comma to seperate the
keywords list.

Submitted by:	tjr
2002-06-08 18:11:52 +00:00
Bruce Evans
b3a3c64940 Fixed unsorting. 2002-06-08 06:49:15 +00:00
Juli Mallett
50355bb408 Don't say that the list of formats can be space delimited, it no longer can be.
Mention that more than one -o will concatenate formats.

Submitted by:	Jun Kuriyama <kuriyama@imgsrc.co.jp>
2002-06-08 05:47:46 +00:00
Juli Mallett
6bb72963c0 Back out previous back out of previously correct code.
Double-plus-pointy-hat to:	jmallett
Submitted by:			bde
2002-06-07 01:14:05 +00:00
Juli Mallett
eb7891df6c Remove tunables to hide warnings that no longer exist. 2002-06-07 00:01:00 +00:00
Juli Mallett
c3f1b5a9db Cast to long to match format. Hidden by revision 1.18 of Makefile. 2002-06-07 00:00:29 +00:00
Juli Mallett
ba2cd77062 Use a global `now' variable for the current time, and initialise it at
startup, right after calling setlocale(3).
2002-06-06 21:21:25 +00:00
Juli Mallett
76e1a9fe48 Implement a SUSv3-ignorant but "time"-similar format for "etime", elapsed
run time (NOT cpu time).  cputime() and elapsed() both need to honour SUSv3
now.
2002-06-06 21:18:37 +00:00
Juli Mallett
4049699b95 sysctlbyname(3) returns -1 on failure, not any other value < 0. 2002-06-06 20:59:15 +00:00
Juli Mallett
e8eef4bb45 Support the SUSv3 `rgroup' format.
Clean up some local style bogons.
2002-06-06 20:42:16 +00:00
Juli Mallett
3d0d5dccc1 Cast arg_max to size_t when comparing it (times 4, plus 1) against SIZE_MAX. I
was worried about truncation of arg_max by this cast, but if it gets truncated,
we know it'll obviously be greater than SIZE_MAX anyway.

Big pointy hat to:	jmallett
Submitted by:		keramida
2002-06-06 20:29:39 +00:00
Juli Mallett
033340171a SUSv3 conform on the "comm" and "args" formats, and make correct the "command"
format, since it's BSDlike, and "comm" is actually different.
2002-06-06 20:21:47 +00:00
Juli Mallett
badfdad910 Refer to the command format by its SUSv3 name (comm), and list command as an
alias.
2002-06-06 18:10:12 +00:00
Juli Mallett
40fea9c3a5 As per behaviour on SVR4 systems, to allow any desirable type of header in the
override, seperate by comma (',') only, rather than any type of whitespace
(the literal space character (' ') had already been removed from this list).

This allows things like:
miamivice# ps -opid='Process
> Identifier'
Process
Identifier
              1350
              1445
              1450

To work.
2002-06-06 18:04:46 +00:00
Tim J. Robbins
8b34ad92a2 Document the -f and -v options of the unset builtin. 2002-06-06 04:12:50 +00:00