Commit Graph

760 Commits

Author SHA1 Message Date
Sheldon Hearn
e918fc8f72 Follow-up on mdoc fixes in rev 1.35; this includes things that I missed
in that revision as well as things I broke in that revision.  A note-
worthy instance of the latter case was the inversion of -E and -V in the
subsection on Commandline Editing.
1999-11-18 08:13:21 +00:00
Martin Cracauer
6d9efc2432 The pipleline problem introduced in version 1.22 wasn't fully fixed in
1.23. This revision should work for long pipes both in
here-documents/backquote and in normal cases.

Fix works for jmz, bde.
1999-11-17 16:53:34 +00:00
Peter Wemm
821079e9be I'm probably jumping the gun, but what the heck, this is -current.
Turn off setgid-kmem for /bin/ps, it's now quite functional without it.
ps no longer needs /dev/*mem or /proc.  (It will still use some /proc
files if they are available for -e, but it's not required, so it'll
happily run in a jail or chroot).

The proc stats are now part of eproc (obtained via sysctl) and no longer
needs to beat up the u-page reading code and the problems with that.

This also has the side effect of disabling 'ps -e' for normal users
*EXCEPT* when looking at their own processes.  ie: they can see
environments in processes with their uid, enforced by the ownership of
/proc/*/mem.  Root can still see them all, as it can open all /proc/*/mem.
1999-11-17 13:37:30 +00:00
Peter Wemm
602a69d61e Use eproc.e_stats, not a series of crude hacks to fetch it from the u-area.
Also, fix some indentation that got messed up somehow..
1999-11-17 12:52:42 +00:00
Poul-Henning Kamp
b9df5231ca Introduce commandline caching in the kernel.
This fixes some nasty procfs problems for SMP, makes ps(1) run much faster,
and makes ps(1) even less dependent on /proc which will aid chroot and
jails alike.

To disable this facility and revert to previous behaviour:
        sysctl -w kern.ps_arg_cache_limit=0

For full details see the current@FreeBSD.org mail-archives.
1999-11-16 20:31:58 +00:00
Kris Kennaway
bdfebd8480 Typo (appropiate -> appropriate)
Obtained from:	OpenBSD (inspired by)
1999-11-15 03:37:57 +00:00
Sheldon Hearn
646e0924a1 Allow the year to be specified with an optional century.
PR:	14472
Reported by:	j_guojun@lbl.gov (Jin Guojun)
1999-11-10 13:34:39 +00:00
Sheldon Hearn
150c3a33b9 Don't call bash(1) a Korn shell clone. Instead, use pdksh(1) as an
example of such a clone.

PR:		14601
Submitted by:	Matthias Buelow <mkb@altair.mayn.de>
1999-11-10 13:27:54 +00:00
Steve Price
6edf2a5be8 Correct logic from previous commit - middle processes in long pipes
don't have their stdin closed indisciminantly.

Reviewed by:	markm
1999-11-07 17:07:05 +00:00
Martin Cracauer
74eeb719fd When a backquote command inside a here-document had a pipe with more
than two processes (got that? :-), the stdin fd of the middle
processes that has just been set up was accidetially closed. Don't do
this.

PR:		bin/14527
1999-11-05 12:06:30 +00:00
Julian Elischer
5b42dac8ec Most modern OSs have the ability to flag certain mounts as ones to
be ignored by default by the df(1) program.  This is used mostly to
avoid stat()-ing entries that do not represent "real" disk mount
points (such as those made by an automounter such as amd.)  It is
also useful not to have to stat() these entries because it takes
longer to report them that for other file systems, being that these
mount points are served by a user-level file server and resulting in
several context switches.  Worse, if the automounter is down
unexpectedly, a causal df(1) will hang in an interruptible way.

PR:		kern/9764
Submitted by:	Erez Zadok <ezk@cs.columbia.edu>
1999-11-01 04:57:43 +00:00
Ruslan Ermilov
22307be5c9 Restore reference to sleep(3). 1999-10-28 17:41:33 +00:00
Martin Cracauer
905f2e447b Fix ';' command when used with -e flag.
PR:		bin/14509
1999-10-26 13:17:18 +00:00
David E. O'Brien
64cfb0f130 Add `n' to the synopsis.
Forgotten by:	sheldonh
1999-10-16 16:17:54 +00:00
Brian Feldman
7cde774d15 Implement ulimit -b for RLIMIT_SBSIZE. 1999-10-09 20:56:06 +00:00
Brian Feldman
6b3ced11a2 This implements the RLIMIT_SBSIZE ("sbsize") administrative limits for
userland.  Currently, it can be enforced by login and csh.  More
shells supporting sbsize are welcome.
1999-10-09 20:47:59 +00:00
Sheldon Hearn
49e11e3a66 Mdoc cleanup, with a few grammar cleanups on the side.
Reviewed by:	mpp
1999-10-07 13:56:43 +00:00
Brian Feldman
bf3367d091 Nuke the FIODTYPE compatibility bits. It's time. 1999-10-03 18:49:51 +00:00
Ruslan Ermilov
ac14c3115f Let sleep(1) handle fractions of a second (up to nanosecond).
This is a conservative change.  It does the same thing in weird
cases like the old one.  For example, 'sleep abcd' still sleeps
for zero seconds.  `sleep 10.a' and `sleep 10.05aa' do the best
and not abort (ie: 10.a == 10 seconds, 10.05a == 10.05 seconds).
1999-10-01 07:53:40 +00:00
Mark Murray
69746547bd Fix for new Kerberos4. 1999-09-19 22:11:15 +00:00
Brian Feldman
5ff6541e7a Make count=0 set cpy_cnt to -1, which is slight overloading, but makes
what I was trying to do work much better (ie at all.  I could have sworn
it was working...) Fix a SEEK_SET to be SEEK_CUR, and make Bruce's
lseek() test work correctly.
1999-09-16 19:50:59 +00:00
Brian Feldman
1838cf5671 Let count=-something fail, while count=0 may succeed, thus making dd(1)
useful as a seeking-tool as well as its many other uses.  Previously,
dd(1) would succeed with count=0, but wouldn't get to the point that
blocks were to be read/written. This is a more useful behavior, and
this specific case doesn't seem to be handled by POSIX.
1999-09-16 05:12:59 +00:00
Sheldon Hearn
e6d3cf2648 Correct some hard sentence breaks. Only those surrounding the previous
commit and those which cause ugly nroff output have been fixed, since
the purpose of the style guideline which they contravene is to reduce
the sizes of deltas.

Reported by:	bde
1999-09-14 11:46:04 +00:00
Brian Feldman
7599187e0d Even more dd(1) cleanups! Thanks to Bruce for staying on my case until
we're done (not yet!) :)
1999-09-13 21:47:10 +00:00
Alexey Zelkin
980bb531d7 Fix SEE ALSO section:
. add printenv(1)
. correct reference to "CSH introduction"

Reviewed by:	mpp
1999-09-13 19:16:47 +00:00
Bruce Evans
4a086b52ca Fixed longstanding breakage of rm of deep directories in rev.1.2.
rm must not use FTS_NOCHDIR, since chdir'ing is required for removing
deep directory trees and the ability to remove such trees is required
by POSIX.2 and POLA.  The breakage didn't make much difference until
recently, since fts(3) didn't work in deep directory trees.  It isn't
clear whether using FTS_NOCHDIR ever fixed anything (Net/2's rm.c is
similar to Lite1's).  Perhaps it was actually to limit the damage
caused by the fts bug.
1999-09-13 15:12:30 +00:00
Brian Feldman
32952d4b37 ISDISK -> ISSEEK
Allow a device type of D_DISK or D_MEM to be ISSEEK.
1999-09-12 18:56:12 +00:00
Brian Feldman
5868747254 Even more cleanups to dd(1). This is probably the culmination of the
BDEification process of dd(1). Most of the changes are from BDE's archive.
Support for negative offsets is gone again, but the case where you
lseek() onto byte -1 of something from a negative offset using seek/skip
is fixed; if you end up on -1, you won't get a false positive lseek failure.
  The biggest changes are to data types (more size_t, for instance) and
argument parsing. skip/seek on /dev/{,k}mem now occurs (instead of "read
until you reach the offset") due to mem devices now being D_DISK. Some
const things are now correctly declared as such, and the "case table"
building is better. The only thing that seems to be left to make dd(1)
everything TOG wants it to be is l10n.
1999-09-12 16:51:53 +00:00
David E. O'Brien
b598b07322 Add verbose processing flag. 1999-09-11 10:06:56 +00:00
Brian Feldman
e14f7e789a Make a bit more headway with dd's argument parsing, etc. get_bsz() is
renamed get_num() since it's not just about block sizes. skip and
seek can be any offset, including negative, now. Some style bogons are fixed.
1999-09-11 00:02:42 +00:00
Sheldon Hearn
c644db6aa2 Improve shell documentation:
* Consistently misspell built-in as builtin.

* Add a builtin(1) manpage and create builtin(1) MLINKS for all shell
  builtin commands for which no standalone utility exists.  These MLINKS
  replace those that were created for csh(1).

* Add appropriate xrefs for builtin(1) to the csh(1) and sh(1) manpages,
  as well as to the manpages of standalone utilities which are supported
  as shell builtin commands in at least one of the shells. In such
  manpages, explain that similar functionality may be provided as a
  shell builtin command.

* Improve sh(1)'s description of the cd builtin command. Csh(1) already
  describes it adequately. Replace the cd(1) manpage with a builtin(1)
  MLINKS link.

* Clean up some mdoc problems: use Xr instead of literal "foo(n)"; use
  Ic instead of Xr for shell builtin commands.

* Undo English contractions.

Reviewed by:	mpp, rgrimes
1999-09-08 15:40:46 +00:00
Michael Haro
777d1f8281 brucify, v' before W', mention -v is non-standard in manpage and
make code slightly easier to read

Reviewed by:	obrien
1999-09-04 03:40:10 +00:00
Michael Haro
234c2f5b6e mention that -v is non-standard
Reviewed-by:	obrien
1999-09-04 03:33:18 +00:00
Michael Haro
2f5f84c566 brucify and add comment about -v being non-standard to manpage
Reviewed by:	obrien
1999-09-04 03:19:38 +00:00
Sheldon Hearn
ccbd308159 Revert to using .Xr for builtins. The cross-references don't work now,
but that doesn't mean that they will never work.

Requested by:	mpp, rgrimes
1999-08-31 12:44:52 +00:00
Sheldon Hearn
6b15476ec9 Clean-up:
Fix grammar and spelling nits.
	Use .Dq and .Qq where appropriate.
	Divorce trailing punctuation from quoted elements.
	Use .Dq instead of .Xr for builtins.
	Remove trailing whitespace and blank lines.

PR:	13340
1999-08-30 10:13:04 +00:00
Bruce Evans
158562983e Yet another previously forgotten merge from Lite2. (Describe
`opaque', fix reversed description of `nodump', and don't use
`nodump' as an example of adding a `no' prefix since the double
negative would be confusing (it's still confusing -- the implicitly
documented `nonodump' flag doesn't exist).)
1999-08-30 03:40:26 +00:00
Michael Haro
0b93733576 fix rm -r
Submitted by:	John Hay -- John.Hay@mikom.csir.co.za
1999-08-29 19:57:03 +00:00
Michael Haro
46fedeb096 add verbose flag 1999-08-29 08:21:16 +00:00
Michael Haro
fcb2f1b389 brucify and move printf() to catch cases of special files 1999-08-29 07:58:19 +00:00
Michael Haro
bfbdd545e1 add verbose flag
exit(1) --> exit(EX_USAGE)

Reviewed by:	obrien
1999-08-29 02:20:26 +00:00
Mike Pritchard
d3183183c2 Fix typo in previous commit that documented the -v option. 1999-08-28 21:38:36 +00:00
Michael Haro
1df89a603d add verbose flag
Reviewed by:	obrien
1999-08-28 20:46:00 +00:00
Brian Feldman
ff8bb989ab Relax things a bit. Not having FIODTYPE will be a warning for now.
Pointy hat:	green
Pointed out by:	peter
1999-08-28 03:37:38 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Peter Wemm
2a4562393f $Id$ -> $FreeBSD$ 1999-08-27 23:15:48 +00:00
Brian Feldman
e08d7384ee Use FIODTYPE to unbogosify much of the file type checking in dd. 1999-08-27 16:36:46 +00:00
Sheldon Hearn
b84897d106 Don't suggest sysctl(8) as a means for discovering what filesystem types
are available; suggest lsvfs(1) instead.

Reported by:	Neil Blakey-Milner <nbm@rucus.ru.ac.za>
1999-08-26 16:47:03 +00:00
Thomas Gellekum
8f0561cc42 Make the behaviour of `read -e', ie. treating backslashes as special,
the default. Add -r option for the read builtin to reverse this.

PR:		13274
Reviewed by:	cpiazza, hoek, sheldonh
1999-08-26 08:16:27 +00:00
Michael Haro
4506e9078e Add a verbose mode to show what files are being copied.
Idea taken from obrien.

Reviewed by:	obrien
1999-08-26 02:44:56 +00:00