Commit Graph

2172 Commits

Author SHA1 Message Date
jhb
64b8916c3e Add a few more references to -U. 2006-03-24 16:43:58 +00:00
jhb
3d92b82bd8 Add a new -U flag to instruct ls to use the birthtime for printing or
sorting.

Submitted by:	Andrzej Tobola ato at iem dot pw dot edu dot pl
MFC after:	1 week
2006-03-24 16:38:02 +00:00
ru
9e7d2c38b6 Fix spelling. 2006-03-19 19:10:39 +00:00
ru
388e590f95 Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
rwatson
201a1558c6 Add "-q" argument to getfacl(1), which suppresses the per-file header
comment listing the file name, owner, and group.

MFC after:	1 week
Submitted by:	Jan Srzednicki <w at expro dot pl>
2006-03-13 11:45:29 +00:00
trhodes
eeffa50069 Use .Cm for all key words, not just the ones I added. More in line with
mdoc(7) according to ru.

Requested by:	ru
2006-03-10 12:37:19 +00:00
gad
59d0573b93 Collapse strncpy/strncat/strncat into a single snprintf, as suggested
by pjd.

MFC after:	3 weeks
2006-03-08 09:15:20 +00:00
gad
ec3e08db90 Fix the case where the user specifies an alternate heading for some
output-format keyword, and the keyword they picked is an alias to
some other keyword.                 E.g.:   ps -o stat=Zustand $$
('stat' is defined as an alias for 'state')

PR:		bin/57833
MFC after:	3 weeks
2006-03-08 08:58:44 +00:00
trhodes
e26ef35902 Slightly better markup.
Discussed with:	ru
2006-03-06 10:12:14 +00:00
trhodes
aa556cf7d3 Instead of just hinting at available octets, list some.
Mention that the setting of securelevel may affect one's ability to alter flags.
Xref security.7.
Bump doc date.
2006-03-04 02:38:40 +00:00
cognet
0f32580a80 For pts, print the pts number, instead of the full name. As it was, we ended
up always printing "pts".

Submitted by:	Michal Mertl <mime at traveller dot cz>
2006-02-21 13:02:18 +00:00
ume
30ad96b704 Enable NLS catalog of csh(1).
The tcsh 6.14 uses libiconv to convert catalogs to appropriate charset
dynamically.  However, we don't have libiconv in our tree.  So, I made
some hack to load libiconv dynamically.  If libiconv is available, you
can use catalogs for more locales than the locales which catalog is
actually installed.
To use this feature, you need to symlink catalogs to appropriate
locales.  You can do this by installing ports/shells/tcsh_nls.

Reviewed by:	arch (no objection)
MFC after:	1 week
2006-02-19 06:40:29 +00:00
glebius
e85d27fb5c Add '-F' option which allows to delete existing empty directories, when
creating symbolic links.

PR:		bin/92149
Submitted by:	Eugene Grosbein <eugen grosbein.pp.ru>
2006-02-14 11:08:05 +00:00
schweikh
f4138ecb02 Initialize PWD early on (don't expect it to be inherited from the
environment or set it only when changing directories with cd).

PR:	standards/92640
2006-02-04 14:47:19 +00:00
schweikh
a1b48439af s/staticly/statically/g 2006-02-04 14:41:27 +00:00
schweikh
211f90fcfb s/varable/variable/; s/tored/stored/ 2006-02-04 14:38:37 +00:00
schweikh
627562241f Remove some white space at EOL. 2006-02-04 14:37:50 +00:00
stefanf
5554ab143e Document that '#' starts a comment.
PR:		85103
Submitted by:	garys
Obtained from:	pdksh manual
Patch from:	Daniel Gerzo (with changes by me)
2006-01-01 16:02:12 +00:00
maxim
b2df6a6cc0 o Now when SIG_IGN signal action for SIGCHLD reap zombies
automatically it is possible wait4(2) returns -1 and sets
errno = ECHILD if there were forked children.  A user can
set such signal handler e.g. via ``trap "" 20'', see a PR
for the test case.  Deal with this case and mark a job as
JOBDONE.

PR:		bin/90334
Submitted by:	bde
MFC after:	4 weeks
2005-12-14 17:26:29 +00:00
ru
e279c872b1 [mdoc] add missing space before a punctuation type argument. 2005-12-13 17:07:52 +00:00
stefanf
88baff4d5f - Document trap's -l option and the behaviour of a missing action or a single
dash.
- Discourage the omission of the action.

PR:		70985 [1]
Submitted by:	Martin Kammerhofer
2005-12-08 21:18:59 +00:00
stefanf
0dcfd185af Print empty quotes ('') when an empty string is passed to outqstr().
This makes a difference for the trap builtin, where after "trap '' 0" we
printed "trap -- quit".  This is wrong, because an empty action means to reset
the action to the default.  A side effect of this commit is that empty
variables are now printed as "variable=''" instead of just "variable=".
2005-12-08 21:00:39 +00:00
stefanf
e308dfd964 Correctly quote the output when showing the installed trap actions.
PR:		74043
Submitted by:	Jilles Tjoelker
2005-12-08 20:08:36 +00:00
stefanf
d42177951b Clarify that the echo builtin takes an arbitrary number of strings.
Mention that spaces are printed between the strings.
2005-12-08 17:59:54 +00:00
stefanf
9efed7168d Sort. 2005-12-04 20:01:48 +00:00
stefanf
2df32c17d3 Remove a few commented out builtins from the original ash. The files
implementing them were never part of FreeBSD.
2005-12-04 19:37:07 +00:00
stefanf
5c1966823e Add the times builtin. It reports the user and system time for the shell
itself and its children.  Instead of calling times() (as implied by POSIX) this
implementation directly calls getrusage() to get the times because this is more
convenient.
2005-12-04 18:44:21 +00:00
ru
6bbac1a76d -mdoc sweep. 2005-11-17 12:15:23 +00:00
ru
872d416547 Having three options (-a, -A, -I) controlling the output of dotted
files is too much and hard to follow.  Instead, make the -I option
just mean "do not automatically set -A for root".  That is, if -A
is explicitly set, -I is ignored.  Also, document -I in usage().
(The ls.c diff is better viewed relative to rev. 1.80.)

No objection:	mux
Silence from:	mnag
MFC after:	3 days
2005-11-16 07:13:37 +00:00
mux
8947146b97 Mention the non-standardness of the -I option in ls(1).
Spotted by:	ru
MFC after:	3 days
2005-11-10 14:26:50 +00:00
mux
bb06a78340 Add a -I option to disable the automatic -A flag for the super-user.
PR:		bin/86710
Submitted by:	Marcus Alves Grando
MFC after:	3 days
2005-11-10 00:02:32 +00:00
jcamou
93ee5d4e7b Add local' and return' to the list of built-ins.
Submitted by:	garys
Approved by:	trhodes (mentor)
2005-11-03 00:15:19 +00:00
trhodes
c85026495e Note which options are not part of the standards.
Xref locale(1) and bump document date.

Reviewed by:	keramida
No Objections:	-standards
2005-11-01 19:31:25 +00:00
stefanf
45548c80df Include disabled options in the output of 'set +o'. POSIX says the output of
set +o can be used to reload previous settings, for this to work disabled
options must be printed as well or otherwise options that were set in the mean
time won't be turned off.

To avoid an excessively long output line I formatted the output to print only
six options per line.

Submitted by:	Jilles Tjoelker
PR:		73500
2005-10-29 18:41:35 +00:00
stefanf
a5324897c5 Document command -v and -V.
Glanced at by:	simon
2005-10-29 13:08:35 +00:00
stefanf
9d5c45dd33 Document that read -t timeout returns 1 if the timeout elapses. 2005-10-29 08:22:09 +00:00
stefanf
21aa82a5ae Add the POSIX options -v and -V to the 'command' builtin. Both describe the
type of their argument, if it is a shell function, an alias, a builtin, etc.
-V is more verbose than -v.

PR:	77259, 84539
2005-10-28 18:37:09 +00:00
stefanf
54091cfc82 Protect malloc, realloc and free calls with INT{ON,OFF} directly in chkalloc,
ckrealloc and ckfree (added), respectively.  sh jumps out of the signal handler
using longjmp which is obviously a bad idea during malloc calls.

Note: I think there is still a small race here because volatile sig_atomic_t
only guarantees atomic reads and writes while we're doing increments and
decrements.

Protect a setmode call with INT{ON,OFF} as it calls malloc internally.

PR:		45478
Patch from:	Nate Eldredge
2005-10-28 10:45:19 +00:00
stefanf
267cbf8d22 Use the new name H_SETSIZE instead of the old H_EVENT to set the history
size.

PR:	86355
2005-10-19 15:37:43 +00:00
dougb
1a601e1eb1 Give .Dd a tummy rub, forgotten on my last commit. 2005-09-30 02:12:15 +00:00
dougb
a6ef64df7a Handle the case where the -P flag is specified for a read-only file
earlier, and more gracefully. Previously, this combination would be
ignored early in the code where permissions are tested and fail later
with a very unhelpful "permission denied" error.

Instead, test for this flag in the same block that generates the
"override?" messages for read-only files, but instead of trying
to guess what the user has in mind, generate an error and exit.

Update the man page to reflect this new behavior.

Not objected to by:	freebsd-hackers@
2005-09-29 20:40:29 +00:00
mp
d6a716bd2a Bump up BUFSIZE from 4k to 8k. This was requested by portmgr@ to allow
ports builds in the cluster to work correctly.

Tested by: kris
2005-09-22 18:32:53 +00:00
rwatson
3b28b9c819 Add a "-q" quiet flag to kenv so that warnings can be suppressed.
MFC after:	1 week
2005-09-13 19:01:53 +00:00
stefanf
4ca0c8b501 Elaborate on the behaviour of set -e. 2005-09-10 09:28:39 +00:00
stefanf
c39c1e0d62 Pass the EV_TESTED flag to evalloop() and evalfor(). This fixes unwanted
termination with set -e if a command fails in a loop body inside a function
with an explicitely tested exit status, eg

	f() {
		for i in 1 2 3; do
			false
		done
	}
	f || true

Briefly reviewed by:	cracauer
2005-09-10 08:25:28 +00:00
stefanf
2485a74343 Pass the EV_TESTED flag to the left operand of NSEMI nodes. This fixes
two cases of unwanted termination with set -e:

* if-commands containing several commands separated by semicolons, eg

	if false; false; then [...]

* functions with an explicitely tested exit status that contain a failing
  command which is not the last one, eg

	f() {
		false
		false
	}
	f || true

PR:	77067, 85267
Briefly reviewed by:	cracauer
2005-09-10 08:19:58 +00:00
stefanf
ea5e582b96 Exit the shell if a pipeline that is not preceded by ! fails and set -e is
active.  Use a separate flag to avoid adding another condition to the
if-statement at the end of evaltree().

Briefly reviewed by:	cracauer
2005-09-10 07:41:36 +00:00
stefanf
14d2a8a99c Split the export synopsis into two lines as -p cannot be mixed with variable
names.
2005-09-09 21:06:03 +00:00
stefanf
6a55d3e0eb - Provide a reasonable error message for `export -p var'.
- Use argv rather than argptr since getopt() is used here.
2005-09-09 21:03:34 +00:00
stefanf
37f88a8649 Fix the error message if the mask that is passed to umask -S contains
non-digits.
2005-09-09 19:59:41 +00:00
rse
a339f295af Mention that uuidgen(1) generates DCE version 1 UUIDs only 2005-09-07 07:49:21 +00:00
rse
3a911d4bc8 fix typos: decribed -> described, preceeded -> preceded 2005-09-06 20:14:39 +00:00
rse
fe548cd4fa Various small code cleanups resulting from a code reviewing
and linting procedure:

1. Remove useless sub-expression:

   - if (*start || (!ifsspc && start > string && (nulonly || 1))) {
   + if (*start || (!ifsspc && start > string)) {

   The sub-expression "(nulonly || 1)" always evaluates to true and
   according to CVS logs seems to be just a left-over from some
   debugging and introduced by accident. Removing the sub-expression
   doesn't change semantics and a code inspection showed that the
   variable "nulonly" is also not necessary here in any way (and the
   expression would require fixing instead of removing).

2. Remove dead code:

   -                if (backslash && c == '\\') {
   -                        if (read(STDIN_FILENO, &c, 1) != 1) {
   -                                status = 1;
   -                                break;
   -                        }
   -                        STPUTC(c, p);
   -                } else if (ap[1] != NULL && strchr(ifs, c) != NULL) {
   +                if (ap[1] != NULL && strchr(ifs, c) != NULL) {

   Inspection of the control and data flow showed that variable
   "backslash" is always false (0) when the "if"-expression is
   evaluated, hence the whole block is effectively dead code.
   Additionally, the skipping of characters after a backslash is already
   performed correctly a few lines above, so this code is also not
   needed at all. According to the CVS logs and the ASH 0.2 sources,
   this code existed in this way already since its early days.

3. Cleanup Style:

   - ! trap[signo][0] == '\0' &&
   + ! (trap[signo][0] == '\0') &&

   The expression wants to ensure the trap is not assigned the empty
   string. But the "!" operator has higher precedence than "==", so the
   comparison should be put into parenthesis to form the intended way of
   expression. Nevertheless the code was effectively not really broken
   as both particular NUL comparisons are semantically equal, of course.
   But the parenthesized version is a lot more intuitive.

4. Remove shadowing variable declaration:

   - char *q;

   The declaration of symbol "q" hides another identical declaration of
   "q" in the same context. As the other "q" is already reused multiple
   times and also can be reused again without negative side-effects,
   just remove the shadowing declaration.

5. Just small cosmetics:

   - if (ifsset() != 0)
   + if (ifsset())

   The ifsset() macro is already coded by returning the boolean result
   of a comparison operator, so no need to compare this boolean result
   again against a numerical value. This also aligns the macros usage to
   the remaining existing code.

Reviewed by: stefanf@
2005-09-06 19:30:00 +00:00
rse
4484576c7c fix typo: ommitted -> omitted 2005-09-06 16:08:37 +00:00
stefanf
db33f77468 Print pointers with %p rather than casting them to long. 2005-09-05 17:57:19 +00:00
csjp
549c6812a9 Attempt to complete the userspace integration of POSIX.1e extended ACLs.
This includes adding support for ACLs into cp(1) and mv(1) userspace
utilities.

For mv(1), if _PC_ACL_EXTENDED is in effect for the source AND destination
operands, the destination file's ACLs shall reflect the source.

For cp(1), if _PC_ACL_EXTENDED is in effect for both source and destination
operands, and -p has been specified, the ACLs from the source shall be
preserved on the destination.

MFC after:	1 month
2005-09-05 04:36:08 +00:00
stefanf
50da0d71bf Document that `in word ...' is optional in the for command. 2005-09-03 16:06:04 +00:00
stefanf
f9a3b17353 Return 1 from the unalias builtin if _any_ removal fails, not just the last
one.
2005-09-02 22:43:28 +00:00
stefanf
90dec1edc1 Remove extra getenv() declaration. 2005-09-02 22:28:27 +00:00
stefanf
9426f09a8e Document that unalias can be used to remove several alias names. 2005-09-02 21:15:56 +00:00
garys
a10ff72c17 Improved descriptions of block size handling.
PR:             docs/84765
Submitted by:   garys
Approved by:    keramida
MFC after:      3 days
2005-08-31 17:58:38 +00:00
jcamou
807c0b2541 Wrap a line due to a new sentence.
Noticed by:	simon
Approved by:	trhodes (mentor)
2005-08-29 21:28:12 +00:00
jcamou
d634255a1c o Discuss the ways to escape an alias.
o Fix the alias syntax lines.
o Refer to the Aliases subsection.

PR:		docs/84914
Submitted by:	garys
Approved by:	trhodes (mentor)
MFC after:	3 days
2005-08-29 06:47:43 +00:00
stefanf
5b1426ccf5 Document umask's -S option. 2005-08-17 19:44:15 +00:00
stefanf
95a7612221 Remove a hack for an ancient gdb. 2005-08-15 17:49:38 +00:00
stefanf
a43c6eba96 Recent cleanups made it possible to bump WARNS to 3. 2005-08-14 07:46:56 +00:00
stefanf
d7c6f147cb Put the comparison with PEOF into a new macro is_eof(). Don't use it if the
character comes from a string.
2005-08-13 15:47:13 +00:00
stefanf
e4a640448d Declare echocmd() and testcmd(). 2005-08-13 15:04:30 +00:00
stefanf
9ea5fb8954 Use assignment rather than comparison. 2005-08-13 15:00:54 +00:00
stefanf
810123c2f6 - Provide all initialisers for a struct event.
- Include init.h in the generated init.c.
- Generate prototypes and put the brace on the next line.
2005-08-13 08:38:02 +00:00
stefanf
4aaeb3754a First declare the functions to pacify -Wmissing-prototypes. 2005-08-13 08:31:37 +00:00
stefanf
00771217a6 Include missing headers. 2005-08-13 08:26:58 +00:00
stefanf
75938a7293 Use prototypes in the MKINIT lines collected by mkinit. 2005-08-13 08:12:18 +00:00
stefanf
e015332965 Use prototypes in the generated builtins.{c,h} files. 2005-08-13 08:09:22 +00:00
stefanf
f509d2ea20 cvs -d stefanf@ncvs.FreeBSD.org:/home/ncvs 2005-08-13 07:54:23 +00:00
stefanf
0f8d1315f5 El_parse's third parameter is now const-qualified, add a cast. 2005-08-11 20:28:26 +00:00
stefanf
6abe070f3c Fix a comment.
Submitted by:	Liam J. Foy
2005-08-07 09:11:38 +00:00
phk
92097805fa Don't install examples of NO_EXAMPLES 2005-08-03 09:22:03 +00:00
keramida
8090607544 Spell "protections" correctly. 2005-07-28 18:28:11 +00:00
keramida
b1ddd2636a Spell "background" correctly. 2005-07-28 12:40:23 +00:00
delphij
909e7ff886 Fix a bug when shell expansion is done against dangling symlinks, by
converting the stat() call to a lstat() call, which will cover the
situation.  One can exercise this bug by referring a dangling link with
something like */the-link.

Approved by:	re (scottl)
Submitted by:	Simon 'corecode' Schubert [corecode fs ei tum de]
Obtained from:	NetBSD via DragonFlyBSD (NetBSD rev. 1.51 and DragonFly
		rev. 1.6)
MFC After:	3 days
2005-07-07 18:10:33 +00:00
ru
291174c7f1 Sort sections.
Approved by:	re (blanket)
2005-06-14 08:25:54 +00:00
ru
81411ac5c7 Sorted sections and fixed prompt (PS[12]) strings.
Approved by:	re (blanket)
2005-06-14 08:25:00 +00:00
ru
567c029373 Put the description of the -c option in the right place, as
promised by the Argument List Processing section introduction.
What follows the option in the options list is its long name,
not its argument (as is the case for the -c option).  Also
sort references in the SEE ALSO section.

Approved by:	re (blanket)
2005-06-14 07:50:44 +00:00
des
2bb8de20fe Remove kludges intended to support src trees with partial obj trees.
Discussed with:	ru
2005-06-10 06:12:53 +00:00
dd
fd7de7f99a Remove the EXAMPLES section that describes how to sort by size using
sort(1). This functionality is provided by the -S option now, and it
is useful even though a similar effect is achievable with sort(1),
since the latter doesn't work in combination with -h. This option is
also present in NetBSD, OpenBSD, and GNU fileutils, so there's clearly
a demand for it.

Noticed by:	asmodai
2005-06-03 11:38:35 +00:00
dd
f420c0c650 Improve wording: A sort is "in" a particular order, not "by" a
particular order.
2005-06-03 11:22:06 +00:00
dd
99a2093aa5 Add the -S option to sort files by size. NetBSD and OpenBSD already
have this option with identical semantics (sorting large files first).
-r can be used to reverse the sort if that is desired.

PR:		81625
Submitted by:	Kostas Blekos <mplekos@physics.upatras.gr>, keramida
2005-06-03 11:05:58 +00:00
tjr
af75a9a411 The new name for the DIAGNOSTICS section is EXIT STATUS.
Noticed by:	ru
2005-05-31 12:57:44 +00:00
tjr
0f324ed5e8 Move information about exit status into a DIAGNOSTICS section. 2005-05-29 08:18:48 +00:00
ache
c5682ca184 Fix: printed output flags (onocr) and (onlret) same as oxtabs
PR:             81256
Submitted by:   Arseny Nasokin <tarc@tarc.po.cs.msu.su>
2005-05-26 06:57:57 +00:00
mux
18e53f0af3 Correct a few places where we called warn() when warnx() should have
been used.

Submitted by:	"Liam J. Foy" <liamfoy@sepulcrum.org>
Obtained from:	DragonFlyBSD
2005-05-19 21:33:48 +00:00
gad
2577be2213 A second attempt to adjust option-parsing on a shell command, for the
benefit of scripts start out as:     #!/bin/sh -- # -*- perl -*-
With this fix in place, we can commit a change to kern/imgact_shell.c
so FreeBSD will process the `#!' line in shell-scripts in a more
standard fashion.

PR:		16393
Mentioned on:	freebsd-arch
2005-05-16 04:32:41 +00:00
dd
a15208c6fb Add an interface to the lchflags(2) syscall. The new -h option is
analogous to chmod(1)'s -h. It allows setting flags on symbolic links,
which *do* exist in 5.x+ despite a claim to the contrary in the
chflags(1) man page.

Suggested by:	Chris Dillon
2005-05-14 23:23:10 +00:00
mp
dc094aca69 Define HAVE_STRUCT_UTMP_UT_HOST in order for the REMOTEHOST environment
variable to show up correctly.

Note: This is really a bug with the stock tcsh configure.in script not
including <sys/types.h> before <utmp.h>. But, since config.h is maintained
separate from the contrib sources, this is the correct fix.

Noticed by: ache
2005-05-04 20:21:57 +00:00
maxim
cc6dd6e064 o Typo: s/teminal/terminal/.
Submitted by:	Michal Varga
2005-04-29 11:10:27 +00:00
mp
00d3abec3b Add in FreeBSD specific options for tcsh 6.14. 2005-04-24 19:51:57 +00:00
mp
ed3d22bc12 Add the config.h resulting from running the configure script.
Note: the contents of this file has changed between 6.13 and 6.14.
The old contents of this file has been repocopied to config_p.h.
2005-04-24 19:50:22 +00:00
mp
f9691e638d Add new file (tc.nls.c) to the build. 2005-04-24 19:44:43 +00:00
keramida
517ed8e972 There is no /etc/rc.network anymore.
Submitted by:	Benjamin Rossen <b.rossen@onsnet.nu>
MFC after:	2 weeks
2005-04-17 23:22:22 +00:00
keramida
b4fe464431 Various sh(1) enhancements:
- Move the description of the ``-c string'' option closer to the option itself.
- Add an ENVIRONMENT section (1)
- Add more .Xr cross references to the SEE ALSO section.

Obtained from:  NetBSD (1)
2005-04-15 14:53:29 +00:00
scottl
986a072ce4 Document problems with writing to disks under GEOM. 2005-04-07 20:50:38 +00:00
pjd
a97367034b Add and document the 'jid' keyword for the '-o' option.
Reviewed by:	gad
MFC after:	3 days
2005-03-20 10:40:36 +00:00
obrien
ed5564cbbf Fix bin/pax doesn't wait for compress/gzip before exiting.
Submitted by:	Joerg Sonnenberger <joerg@britannica.bec.de>
Obtained from:	OpenBSD (commited fix to PR 3455)
2005-03-12 06:38:01 +00:00
keramida
df2a700f9f Use `.Pq Ql'' to quote single characters, instead of `.Pq Li''.
This makes the resulting output more aesthetically pleasing in
text-only terminals:

Reviewed by:	ru
2005-03-04 13:16:50 +00:00
keramida
0cc989219b Add a section describing the exit status of the shell.
Obtained from:	NetBSD
2005-03-04 12:40:07 +00:00
trhodes
792676bbc2 Wrap BSD r* commands in NO_RCMDS.
Change NO_RCMDNS to NO_RCMDS and do the switch in bsd.compat.mk.

Discussed with: ru, nectar
2005-03-02 11:53:22 +00:00
obrien
b871335b7a Support \H, \h, \w, \W, \$ string expansion in the prompt.
Submitted by:	mini
2005-03-01 03:35:58 +00:00
phantom
fc580aadfc Fix typo 2005-02-27 18:18:32 +00:00
trhodes
98afb7c0a2 Fix a few markup nits in previous commit.
Noticed by:	ru, who else? :)
2005-02-25 00:40:46 +00:00
trhodes
f1a5d5f825 Note how cp(1) handles directories ending in "/."
PR:		75774
Submitted by:	Mike Meyer <mwm@mired.org> (original version)
2005-02-24 00:06:22 +00:00
trhodes
5ce992ff2e Add information on utilities which may or may not be aware of file flags.
PR:		55653
Submitted by:	Tony Maher <tonymaher@optushome.com.au> (original version)
2005-02-23 23:07:45 +00:00
gad
41238cc6d1 Change /bin/sh so *it* implements the processing needed for scripts to
work as expected when they have a "shebang line" of:

     #!/bin/sh -- # -*- perl -*- -p

This specific line is recommended in some perl documentation, and I think
I've seen similar lines in documentation for ruby and python.  Those
write-ups expect `sh' to ignore everything after the '--' if the first
thing after the '--' is a '#'.  See chapter 19, "The Command-Line Interface"
in 3rd edition of "Programming Perl", for some discussion of why perl
recommends using this line in some circumstances.

The above line does work on solaris, irix and aix (as three data points),
and it used to work on FreeBSD by means of a similar patch to execve().
However, that change to execve() effected *all* shells (which caused
other problems), and that processing was recently removed.

PR:		16393  (the original request to fix the same issue)
Reviewed by:	freebsd-current (looking at a slightly different patch)
MFC after:	1 week
2005-02-16 05:17:58 +00:00
delphij
5c113e48ae Several improvements to ps.1:
- Document the fact that empty heading text suppresses the
	  heading line (e.g. 'ps -o pid='), as this is very useful
	  in scripts.
	- Describe logname keyword more completely.
	- Describe the printing of arguments more completely.
	- Put lockname in the correct alphabetical order in the list
	  of all keywords.
	- Correct sentence in standards section.

Submitted by:	Jilles Tjoelker <jilles at stack nl>
PR:		docs/73618
MFC After:	1 week
2005-02-14 16:56:15 +00:00
ru
6b6b8c04f6 Expand contractions. 2005-02-13 23:45:54 +00:00
ru
1541af42f1 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
ru
114ea39c76 Fixed the misplaced $FreeBSD$. 2005-02-09 18:07:17 +00:00
ru
978b8f7f1d Sync program's usage() with manpage's SYNOPSIS. 2005-02-09 17:37:39 +00:00
csjp
ba0f4166c6 Since it is not un-common for a process's resident set size (rss)
to exceed 10 megabytes in size (especially in X), bump the max
column width from 4 bytes to 5. This will make the ps auxw output
uniform again when a process's rss exceeds 10 megs.

It should be noted that when 5 digits becomes to small, other
solutions should be explored such as displaying them in megabytes
or having ps automatically re-size column widths.

Discussed with:	gad
MFC after:	1 week
2005-02-06 16:34:49 +00:00
phantom
110a2bf37c Use LC_MESSAGES locale category instead of value of LANG environment variable
while opening of tcsh's message catalog.  It gives us more flexibility, and
do not change current behaviour (since we call setlocale() here)

Submitted by:	Rostislav Krasny <rosti_bsd@yahoo.com>
PR:		bin/76773
MFC After:	3 days
2005-02-01 08:48:15 +00:00
delphij
32d71c2dd4 Remove unnecessary SRCS= where could be guessed directly by our
bsd.*.mk infrasture.

Obtained from:	ru
2005-01-27 14:52:47 +00:00
delphij
e0ac0a48cd ps(1) is WARNS=6 on all Tier-1 platforms as far as I can test,
so use default WARNS level from bin/Makefile.inc
2005-01-27 13:42:40 +00:00
delphij
7c352f942e Don't specify SRCS= when it can be obtained from PROGS= 2005-01-27 13:25:09 +00:00
delphij
c643a6e2c1 WARNS?=6 is already in bin/Makefile.inc, so remove this one. 2005-01-27 13:23:05 +00:00
ssouhlal
abd6926192 Remove useless errno.h include.
Approved by:	grehan (mentor)
Obtained from:	DragonFlyBSD
2005-01-26 06:51:28 +00:00
ssouhlal
592ade11be Remove WARNS?= 6 from Makefile, since it is already in src/bin/Makefile.inc
Requested by:	ru
Approved by:	grehan (mentor)
2005-01-26 06:48:17 +00:00
ssouhlal
5ad9327a22 - The first argument of getmode() is a void *
- Add WARNS?= 6

Approved by:	stefanf, grehan (mentor)
Obtained from:	DragonFlyBSD
2005-01-25 14:31:19 +00:00
ru
e8f9b51a47 De-kerberize the manpage. 2005-01-21 09:31:38 +00:00
ru
6cc4b6c220 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
ru
ffd9fd4c0e Add the new standard EXIT STATUS section where appropriate.
Sort standard sections in the (documented) preferred order.
2005-01-16 16:41:59 +00:00
charnier
1ff141d1b6 no need to have break; after return; 2005-01-16 11:10:21 +00:00
ru
d26afd541d Eliminate macro calls inside literal displays. 2005-01-15 12:28:01 +00:00
ru
f88c29d9b1 Removed harmful empty lines that crept in during the copyright
header update.
2005-01-13 08:46:19 +00:00
brian
0e5f9d308c Don't decend into directories when -d is set and the directory itself doesn't
match.

PR:		28095
Submitted by:	bill at twwells dot com
MFC after:	7 days
2005-01-12 03:25:55 +00:00
joerg
c27dcfcc17 The total sum of blocks for the -l and -s option is printed always,
regardless whether the output is to a terminal or not.  As this is
consistent with the SUSPv2 specification (even though we do not
otherwise fully implement SUSPv2's ls(1) options), document this as it
is now, rather than trying to change the behaviour itself.

PR:		docs/76072
Submitted by:	Sebastian Rey <Sebastian.rey@gmx.net>
MFC after:	1 week
2005-01-11 08:51:21 +00:00
imp
a76898b849 /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
imp
16deb40af9 Remove the clause 3, per berkeley and mail from rwatson representing
that nai was OK with all third clause removals.
2005-01-10 08:21:45 +00:00
ru
1cd8ce95ba Scheduled mdoc(7) sweep. 2005-01-09 19:54:23 +00:00
ceri
a649e475d4 Correct typo. 2005-01-04 12:44:25 +00:00
rwatson
f00429a695 Remove single line containing the word "KLD" ommitted in ps.1:1.80.
Pointed out by:	ru (some time ago)
2004-12-22 09:04:47 +00:00
ru
f4c44b761b NOCRYPT -> NO_CRYPT 2004-12-21 10:16:04 +00:00
ru
c1a820195c NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
maxim
3e3573e4ca o Add a missed "." .
Reviewed by:	ru
MFC after:	3 weeks
2004-12-02 13:13:27 +00:00
maxim
d6497bbdb5 o Terminate an endless loop sh -T goes into in dowait() around waitproc().
XXX from Tor: "The shell can also go into a similar loop if the child was
killed by signal 127, since the shell would believe the child to have
only stopped (WIFSTOPPED() macro returns nonzero value).  Disallowing
signals 127 and 128 will fix that problem."  See kern/19402 for details.

PR:				bin/66242
Submitted by:			tegge
Analysis and testcase by:	demon
MFC after:			3 weeks
2004-12-02 13:12:43 +00:00
rwatson
1de8c442ef Point at the mac(4) man page when describing the -Z option.
Remove reference to /dev/lomac, which is no longer used by mac_lomac(4).

MFC after:	3 days
2004-11-29 12:00:24 +00:00
ru
339fc9c24a Do not emit a spurious warning when "directory" argument
to "rmdir -p" is absolute, with one or more leading slash.
2004-11-20 00:41:08 +00:00
ru
f5e118fbbd Fixed "rmdir -p" that got broken by rev. 1.15.
(This also fixes "rmdir -v /nonexistent".)
2004-11-20 00:12:08 +00:00
csjp
9fa1882006 Use statfs instead of getmntinfo(). This will make the procfs checks
play nicer in prisons. It also simplifies things.

Reviewed by:	rwatson
Bumped into by:	Jilles Tjoelker
2004-11-19 16:11:54 +00:00
csjp
27bff94fe5 Currently if the user specifies -e and procfs is not mounted on /proc,
printing of the process environment will fail silently.

-define a function which will check to see if procfs is mounted on /proc
-Implement this test if the user specified -e
-If procfs is not mounted on /proc and -e was specified, print a warning.
 informing the user that procfs(5) is required.

Reviewed by:	wes, rwatson
2004-11-14 19:30:02 +00:00
ru
d5be7de9fe Removed bitrot. 2004-11-13 17:12:22 +00:00