Commit Graph

741 Commits

Author SHA1 Message Date
Mark Murray
448bbb5805 Fix LIBDIR (for aout/ELF). 1998-08-06 21:41:13 +00:00
Peter Wemm
9723ac470b Use sendmail-8.9.1 rmail (with our changes). 1998-08-04 15:19:16 +00:00
Tim Vanderhoek
bb2b4fafae Add missing "else", without whom the prev. commit is a null change.
Fix a 2nd level indentation style bug.
1998-08-02 22:47:11 +00:00
Bruce Evans
06db156986 Fixed printf format errors (time_t is not necessarily long). 1998-08-02 14:25:24 +00:00
Joseph Koshy
fab2680594 Document behaviour of "-" and "--" on the command line.
PR: docs/5399
1998-07-30 04:47:56 +00:00
Tim Vanderhoek
545f583c55 Allow env. variable LS_COLWIDTHS to specify minimum column widths,
effectively overriding the dynamically-sized-column feature.  This
is mostly useful for non-interactive use, where it may be necessary
to ensure that listings taken at different times have columns that
line-up correctly.  I have been assured that at least one large,
well-known program will soon be taking advantage of this.  :-)

PR:		bin/7011
Submitted by:	Joel Ray Holveck <joelh@gnu.org>
1998-07-29 00:46:13 +00:00
Jacques Vidrine
16c93fc052 Document the printf built-in. 1998-07-27 21:31:19 +00:00
Jacques Vidrine
0bc998d8ab csh built-in printf now expands arguments. e.g.
printf '%d\n' `echo 23`
now works as expected.
PR:		bin/2969
Submitted by:	Gareth McCaughan <gjm11@dpmms.cam.ac.uk>
1998-07-27 21:15:52 +00:00
Joseph Koshy
056103b6d3 Fix use of -man macro, correct description of the behaviour of the `+n'
command to match whats there in the source.

PR: 7328
1998-07-21 04:53:18 +00:00
Bruce Evans
3c3472fb32 Added a `build-tools' target for internal tools.
Removed explicit dependencies of foo.o on foo.c.  These were mainly
placeholders for comments about missing dependencies of tools objects
on headers.  This problem needs to be handled more generally.
1998-07-07 01:06:58 +00:00
Poul-Henning Kamp
85082fc3c3 Pick up kernel variables/constants using sysctl rather than through /dev/mem
Use /dev/null for opening the kvm library, we don't need access to /dev/mem
anymore.

ps can now run without the setgid(kmem) bit.  If it does it will not be
able to show argv/envp for another uid's processes unless you are root.
1998-06-30 21:34:14 +00:00
Bruce Evans
ce0cab88c1 Fixed printf format errors (second round with non-i386 typedefs). 1998-06-28 21:05:48 +00:00
Bruce Evans
fe6f0b0824 Fixed printf format errors. 1998-06-28 21:00:04 +00:00
Bruce Evans
86e14119e9 Oops, the previous log message should have read "Fixed type mismatches -
don't assume that time_t is long".
1998-06-28 18:26:18 +00:00
Bruce Evans
f8ec5fe282 Fixed printf format errors. 1998-06-28 18:19:13 +00:00
Bruce Evans
0eb7b1cad0 Fixed printf format errors. 1998-06-28 18:08:54 +00:00
Joseph Koshy
c7bca09356 Remove compile time dependency on ARG_MAX.
PR: 1791 (partial)
Reviewed by: Bruce Evans <bde@freebsd.org>, Tor Egge <tegge@freebsd.org>
1998-06-17 11:33:10 +00:00
Peter Wemm
4faaa03777 Don't attempt to change owner/mode/flags that don't need to changed.
This should calm down attempts to `cp -p' to a nfs mount or some other
filesystem that doesn't accept flags or all combinations of flags.
It will warn if it fails to change flags though.
1998-06-10 06:29:23 +00:00
Dmitrij Tejblum
f6fa1b35fd Print correct error message if we copy an unreadable directory. 1998-06-09 13:42:51 +00:00
Warner Losh
8a20f85ccb Make sure we don't overflow the path buffer. Exit if we do.
Obtained from or inspired by: A similar change in OpenBSD by theo
1998-06-09 03:39:38 +00:00
Warner Losh
e00e592a7a Make sure we pass the length - 1 to readlink, since it adds its own
NUL at the end of the path.
Inspired by: OpenBSD's changes in this area by theo de raadt
1998-06-09 03:38:43 +00:00
Steve Price
32c2131395 Fix a bunch of spelling errors.
PR:		6856
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-04 21:06:07 +00:00
Joseph Koshy
55cb6cf5fb Fix errors that crept into the previous commit. 1998-06-04 07:02:59 +00:00
Joseph Koshy
77027e301b 1. ps' output now shows 3 characters in the TT' field, not 2, after
rev 1.6 of "ps.c".
2. Reword description of `-f' option.

PR: 5340
Submitted by: Jorge Goncalves <j@bug.fe.up.pt>
1998-06-04 06:46:13 +00:00
Joseph Koshy
d693a28e3c Correct description of -crtscts.
PR: 6836
Submitted by: Andrew <andrew@ugh.net.au>
1998-06-03 04:07:59 +00:00
Steve Price
9e74704eb2 Clarify the example a bit.
PR:		6801
Reviewed by:	David Kelly <dkelly@hiwaay.net>
1998-05-31 22:43:57 +00:00
Bruce Evans
5832a75246 Fixed imperfections in previous commit (a poor variable name,
excessive 64-bit arithmetic, and excessive changes).
1998-05-31 12:09:50 +00:00
Poul-Henning Kamp
e796e00de3 Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.
Clean up (or if antipodic: down) some of the msgbuf stuff.

Use an inline function rather than a macro for timecounter delta.

Maintain process "on-cpu" time as 64 bits of microseconds to avoid
needless second rollover overhead.

Avoid calling microuptime the second time in mi_switch() if we do
not pass through _idle in cpu_switch()

This should reduce our context-switch overhead a bit, in particular
on pre-P5 and SMP systems.

WARNING:  Programs which muck about with struct proc in userland
will have to be fixed.

Reviewed, but found imperfect by:       bde
1998-05-28 09:30:28 +00:00
Poul-Henning Kamp
5734ac28b4 "make world" replaces /bin/rmail even when NO_SENDMAIL has been set to
true in /etc/make.conf.  Both qmail and smail use a different rmail, so
replacing rmail is a Bad Thing.

PR:		6762
Reviewed by:	phk
Submitted by:	Bill Trost <trost@cloud.rain.com>
1998-05-27 09:25:22 +00:00
Steve Price
191b38b5fa Don't append a '/' to the destination directory if there
is already one there.

PR:		3025
1998-05-25 22:44:16 +00:00
Steve Price
ad863cac06 If no value is present for the login name set it to '-'.
Also pretty-up the display of 'ps -Ortprio'.

PR:		4947
Submitted by:	Martin Kammerhofer <dada@sbox.tu-graz.ac.at>
1998-05-25 05:07:18 +00:00
Joseph Koshy
d5440753aa Improve description of absolute modes.
Submitted by: Josh Gilliam <josh@quick.net>
PR: 6634
1998-05-19 06:24:50 +00:00
Philippe Charnier
9ba8bd6557 Correct use of .Nm. Add rcsid. 1998-05-18 06:51:59 +00:00
Philippe Charnier
44dc619ed6 Correct use of .Nm. Add section number to .Xr references. Add rcsid. 1998-05-18 06:50:17 +00:00
Philippe Charnier
3d7b5b9302 Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
Philippe Charnier
1aad99bc66 Correct use of .Nm. Add rcsid. 1998-05-18 06:40:56 +00:00
Philippe Charnier
df73a899fc Correct use of .Nm. Add section number to .Xr references. 1998-05-18 06:39:17 +00:00
Philippe Charnier
f43e9d2251 .Nm rm -> .Nm. 1998-05-18 06:37:35 +00:00
Joseph Koshy
c38eceafa4 kill.1: Remove reference to obsolete sigvec(2) man page. Removed
self reference in sigaction(2) man page.

Submitted by: Josh Gilliam <josh@quick.net>
PR: 6617
1998-05-18 03:33:11 +00:00
Philippe Charnier
c9a8d1f4dd Correct use of .Nm. Add rcsid. 1998-05-15 06:30:58 +00:00
Philippe Charnier
06f628852a correct use of .Nm. Add rcsid. 1998-05-15 06:23:45 +00:00
Philippe Charnier
542ed50153 Correct use of .Nm. Typo. 1998-05-15 06:22:30 +00:00
Philippe Charnier
2a170595d1 Correct use of .Nm. Add rcsid. 1998-05-15 06:19:05 +00:00
Poul-Henning Kamp
84717b42e8 .Sh ENVIRONMENT VARIABLES -> .Sh ENVIRONMENT
PR:		6599
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-05-13 07:57:49 +00:00
Philippe Charnier
61c9c5ebee Correct use of .Nm. Add rcsid. 1998-05-13 07:47:35 +00:00
Philippe Charnier
15638d89b5 Correct use of .Nm. 1998-05-13 07:43:56 +00:00
Philippe Charnier
00c2adfe12 Convert to mdoc. 1998-05-13 07:41:13 +00:00
Philippe Charnier
95d0bf6556 Correct use of .Nm. Add rcsid. 1998-05-13 07:39:11 +00:00
Philippe Charnier
d072138a0a Correct use of .Nm. 1998-05-13 07:35:44 +00:00
Philippe Charnier
1ba0e048a2 Restore Lite-2 sccsid. Restore include of sys/types.h. 1998-05-13 07:33:54 +00:00
Philippe Charnier
574d120677 Restore Lite-2 sccsid. Restore include of sys/param.h. 1998-05-13 07:31:42 +00:00
Philippe Charnier
91ac062612 Restore include of sys/types.h and sys/param.h. 1998-05-13 07:29:15 +00:00
Philippe Charnier
c194af34bd Restore Lite-2 sccsid. 1998-05-13 07:25:17 +00:00
Philippe Charnier
d4e2eddf9d Restore original Lite-2 sccsid. Restore include of sys/types.h. 1998-05-13 07:22:11 +00:00
Philippe Charnier
930ab418d3 Do not remove include of <sys/param.h> and <sys/types.h>. They should
be here before including almost any POSIX header.
Requested by:	Bruce
1998-05-13 07:19:45 +00:00
Philippe Charnier
12f93eb9b1 Restore Lite2 sccsids by removing `const'. Improve documentation a little.
Suggested by:	Bruce
1998-05-13 07:16:37 +00:00
John Birrell
e4dbdeafbe Of these programs, only df and ps aren't compatible with FreeBSD/Alpha.
All the rest work! Actually, I don't know if chio works because I can't
test that. df can be built using NetBSD's mount.h. ps depends on libkvm
so there is no point trying.
1998-05-09 06:42:52 +00:00
Bruce Evans
3ef22d496d Backed out previous backout. Put y.tab.h back in SRCS. 1998-05-06 15:33:59 +00:00
Philippe Charnier
cbf6f7d358 Correct use of .Nm and other cosmetics. Add rcsid. Remove unused #inc. 1998-05-06 06:51:42 +00:00
Philippe Charnier
4c95995fe0 Correct use of .Nm, .An and other cosmetics. Add rcsid. Remove unused #inc. 1998-05-06 06:49:16 +00:00
Bruce Evans
e43e36af7d Backed out previous commit. It was tested, but not for the case where
a separate object tree doesn't exist.  Crufty makefiles will have to
put y.tab.h in SRCS so that we know not to create foo.h from foo.y.
1998-05-05 07:36:55 +00:00
Bruce Evans
b681d90662 Fixed races in `make -jN' using new yacc rules. 1998-05-04 20:09:06 +00:00
Bruce Evans
7e44350e47 Simplified using new yacc rules and by not generating y.tab.h. 1998-05-04 18:41:16 +00:00
Martin Cracauer
686ed44763 When calling a shell function, remember whether exit status is tested.
This is needed for the '-e' option. See the PR for more details.
PR:		6047
Reviewed by:	PR submitter, silence on review request.
1998-05-04 07:24:10 +00:00
Warner Losh
9ca13eea68 Add note about BLOCKSIZE variable to -s flag. 1998-04-29 18:39:51 +00:00
Bruce Evans
cddfa6c981 Backed out most of rev.1.19 (explicit dependencies of object files
on generated headers).  This is now handled generally in bsd.prog.mk.
1998-04-26 16:12:23 +00:00
Andrey A. Chernov
d9a1c82ad1 Fix nasty error in len_octal, result not initialized 1998-04-25 00:12:32 +00:00
Andrey A. Chernov
70183462ad Fix ctype error #1 - chars must be unsigned 1998-04-25 00:10:24 +00:00
Dag-Erling Smørgrav
a2a029d24a Remove the bogus -? option after reading the getopt() manual :) 1998-04-24 20:15:43 +00:00
Dag-Erling Smørgrav
3a34dbf728 o Removed two unused variables (f_dirname and f_newline) in ls.c
o Added the -H and -P options for treatment of symbolic links.

o Removed the #ifdef BSD4_4_LITE, since it does not seem to do anything
  useful

o Fixed up prn_octal() so its output looks more like that of AT&T Unices
  when -b is given.

The next two lines apply only to the first two changes above:

PR:		bin/6140
Submitted by:	Max Euston
1998-04-24 12:43:26 +00:00
Dag-Erling Smørgrav
a8ce505bcb Updated references to the behaviour of ls(1).
PR:		bin/6140
Submitted by:	Max Euston
1998-04-24 12:38:18 +00:00
Dag-Erling Smørgrav
0d86878ce0 o Renamed '-b' (show unprintables in octal) to '-B'
o Added a new '-b' which behaves as in AT&T Unices (show unprintables in
  octal, using C escape codes when possible)

o Added '?' to the getopt() string, since the code in the switch considers
  it as a valid option.
1998-04-24 07:49:51 +00:00
Dag-Erling Smørgrav
7ea3064820 Added -b option to display unprintables in octal.
PR: 1315
1998-04-21 22:02:01 +00:00
Robert Nordier
336f22af33 Spelling/typo fixes: (preceeded, friday). 1998-04-20 21:06:38 +00:00
Mark Murray
dd1383e87b Rats. I was too quick. Work needs to be done on the non-Kerberos
case. Re-enable SUID mode.
1998-03-26 19:41:18 +00:00
Mark Murray
4eff93dd4e KTH announced a weakness in their implementation of KerberosIV.
FreeBSD was not vulnerable, but their fix had some useful features.
Incorporate the best of those - rcp(1) no longer needs to be SUID
to root.
1998-03-26 18:15:00 +00:00
Philippe Charnier
05e61fd508 .Sh AUTHOR -> .Sh AUTHORS
Use .An/.Aq
1998-03-19 07:26:37 +00:00
John Birrell
5c931089a9 Some things only work on i386. 1998-03-13 19:41:06 +00:00
Bruce Evans
8199f5c431 Fixed existence test for secure sources (don't test for secure objects).
Fixed some formatting.
1998-03-06 16:05:18 +00:00
James Raynard
37c77f547a Don't assume sigset_t and int are equivalent. 1998-02-28 10:50:02 +00:00
Bruce Evans
7eaa685e41 Exit with a nonzero status if we get killed by a SIGINT. POSIX.2
specifies exiting with a zero status if the file was copied
successfully, and with a nonzero status if an error occurred.  We
are too sloppy to tell if the file was copied successfully when we
get killed by a SIGINT, but it is unlikely to have been.  Added a
comment about related sloppiness (calling exit() from a signal
handler).
1998-02-24 01:45:05 +00:00
Dima Ruban
0e3b741814 Add 'f' flag to the optstring. 1998-02-18 22:49:58 +00:00
Dima Ruban
6425bb4314 cosmetic change for optstring 1998-02-18 22:45:22 +00:00
John Polstra
6466945a67 Explicitly describe the rules the shell uses to search for a file
sourced by the "." command.
1998-02-12 01:23:11 +00:00
Eivind Eklund
112e2ea9f2 spelling
Obtained from:  OpenBSD (src/bin/chio/chio.c rev 1.7) by todd@openbsd.org
1998-02-11 06:34:38 +00:00
Satoshi Asami
2f719e7069 Fix printing for bytes read > 4G.
Reviewed by:	bde
1998-02-11 02:23:31 +00:00
Martin Cracauer
8624242ab8 Back out my previous attempt to fix SIGINT/SIGTERM behaviour 1998-02-06 23:50:39 +00:00
Martin Cracauer
9dee16dba6 Fix handling of SIGINT/SIGQUIT for foreground subprocesses. Most
urgent need is when you run sh around a program that intentionally
uses SIGQUIT/SIGINT for asynchronous events, i.e. $EDITOR started from
system(2), like many mailers do. This fixes PR bin/1206 and possibly
bin/4241.

The solution committed has been tested for a large number of possible
cases (see recent discussion on cvs-committers). I completed a make
world, made sure 'make world' is interruptable and used the changed
/bin/sh as a login shell all day, including job control and using
SIGQUIT-catching programs (to write this message :-).

PR:		bin/1206
Reviewed by:	discussion on cvs-commiters
1998-02-06 18:14:26 +00:00
John Dyson
dc8ab2b64b Display VSZ much more accurately now. 1998-02-02 05:16:42 +00:00
Steve Price
3de1350407 setpwent now has a void return type, so remove the now bogus cast. 1998-02-01 17:11:07 +00:00
John Birrell
c1e8822ae4 Cast a size_t to a long to avoid a gcc warning. 1998-01-25 08:59:08 +00:00
Bruce Evans
87f01287d2 Removed definition of _NEW_VFSCONF. The new vfsconf interface is now
the default.
1998-01-20 10:40:18 +00:00
Bruce Evans
bf770561ee Fixed syntax error in normally-unconfigured code in previous commit. 1998-01-17 13:39:29 +00:00
Bruce Evans
2f7579bd8d Fixed handling of short writes. Previously, we stopped copying and
printed a bogus warning with a stale errno if write() returns a short
count.  Now we continue copying.  We still print a bogus warning if
write() returns an "impossible" short count of 0.
1998-01-16 07:37:05 +00:00
John Birrell
f1d896d117 Make a couple of the stat flags dependent on the sys/stat.h header file
that this source is compiled against. This source is referenced by
install which is needed as a build tool and must be able to compile
against NetBSD headers and libraries if we have a hope of supporting
another architecture.

With this change, that's two working programs down and 3945 (?) to go.
The other one was make, but that didn't need any changes to work under
FreeBSD/Alpha. 8-)
1998-01-09 06:14:59 +00:00
Joerg Wunsch
1f68c20551 Oops, back out rev 1.5, it wasn't my intention to also commit the
-g. ;)
1998-01-07 22:32:28 +00:00
Joerg Wunsch
a28ea077f9 Use the correct value in the call to swab(3) with conv=swab. Previously,
dd if=/dev/zero of=/dev=null obs=23520 conv=swab
coredumped.

Please somebody review it, i'm not 105 % sure i'm understanding all
this mess correctly.

Detected by:	Holm Tiffe <holm@geophysik.tu-freiberg.de>
1998-01-07 22:31:19 +00:00
Steve Price
ee7dc4169c Correct a bogon in an example.
PR:		5415
Submitted by:	Sergei S. Laskavy <laskavy@pc759.cs.msu.su>
1998-01-02 19:23:05 +00:00
Wolfgang Helbig
fd0e1c252b Ensure stdout is line buffered.
Change "pat" -> "re" in man page.
1997-12-31 12:25:35 +00:00
Alexander Langer
3344c3521c Added $Id$. 1997-12-29 00:00:10 +00:00
Tim Vanderhoek
dfb9495b2a Use consistent spelling,
writeable -> writable (recall prior debate over this? :-)
	initialise -> initialize
	recognise -> recognize

Merry Christmas! :)
1997-12-25 09:36:42 +00:00
Brian Somers
c39934ea32 Add (BSD) copyright headers. 1997-12-21 12:11:13 +00:00
Bruce Evans
8e9c31e830 Don't strip trailing slashes (for the initial rmdir). It breaks
following of the symlink for `rmdir symlink/' and is unnecessary
for ordinary directories (POSIX doesn't require rmdir(1) to do
anything for trailing slashes; it requires rmdir(2) to let them
"refer to a directory", and following the symlink for symlink/ is
what BSD does).  This also fixes bugs in the slash-stripping code
(for paths consisting entirely of slashes, the pointer into the
string was decremented to "before" the beginning of the string,
and the path was at best stripped to "".

The behaviour is unchanged except for the final directory for
`rmdir -p ...'.  There is no alternative to stripping intermediate
slashes since they must be specified.  The sloppy slash-stripping
code is adequate for intermediate directories, since the all-slashes
case fails early.
1997-12-19 20:20:22 +00:00
Eivind Eklund
1ee36a5be6 It's more portable to use <errno.h> than <sys/errno.h>
Pointed-out-by:	bde (a long while ago)
1997-12-15 20:37:43 +00:00
Eivind Eklund
0c7d8ce5a5 Revert 1.15 - duplicate code (initialization).
Pointed-out-by:	bde
1997-12-15 20:34:52 +00:00
Eivind Eklund
5b421cac1a Make code slightly more robust towards change by calculating size
in-place.

Obtained from:  OpenBSD ar_subs.c rev 1.7 by Tood Miller <millert@openbsd.org)
1997-12-12 18:38:22 +00:00
Eivind Eklund
825856aa2c Make this lint more cleanly
Obtained from: OpenBSD file rev 1.4 by mickey
1997-12-12 18:24:17 +00:00
Eivind Eklund
ca8f21d65c Merge from OpenBSD:
>sprintf -> snprintf paranoia

Obtainted from: OpenBSD src/bin/stty/print.c v1.5
	by Todd Miller <millert@openbsd.org>
1997-12-12 18:11:29 +00:00
Brian Somers
ad1c694bdc Put [+format] at the end of the usage message.
Make `date -?' output (pretty much) the same as
the man page
PR:		5269
1997-12-11 02:38:56 +00:00
Eivind Eklund
007d33500e Remove simultaneous include of <sys/param.h> and <sys/types.h>.
Reorder includes to be alphabetical some places since I already was in
here.
1997-12-10 22:18:54 +00:00
Eivind Eklund
a33d9e6606 Merge from OpenBSD:
> Error out if someone tries to mv a mount point.  Old behavior was to
> move all files contained in the mounted filesystem to the dest. dir
> which could be quite nasty.  Personally, I think rename(2) should
> return EPERM or EINVAL instead of EXDEV.

Obtained from: OpenBSD mv.c rev 1.6 by Todd Miller <millert@openbsd.org>
1997-12-10 17:52:49 +00:00
Wolfram Schneider
ac105a5777 Add -P option to cp(1) for local to local copying.
Pointed out by: bde
1997-12-08 21:02:36 +00:00
Wolfram Schneider
f1f5ba1e4c Use cp -R' instead cp -r' for local to local coping
(e.g.: rcp -r /tmp/1 /tmp/2). See the cp(1) manpage for more details.
1997-12-07 20:49:39 +00:00
Peter Wemm
4b4f0fcd24 Move procctl to the Attic, it's been copied to usr.sbin/procctl as
suggested by bde via sef.
1997-12-07 02:26:23 +00:00
Sean Eric Fagan
a367d57578 Add procctl to the list of programs built. 1997-12-06 04:19:41 +00:00
Sean Eric Fagan
c430992a81 First checkin of the procctl program. 1997-12-06 04:19:09 +00:00
John Dyson
b548141b9b Document the new -f flag.
PR:	5196
Submitted by:	Matt Dillon <dillon@best.net>
1997-12-05 07:35:31 +00:00
John Dyson
3ac5e95583 Add an option to building PS, so that the upages are explicitly paged in only
for users who are root, or in group wheel.  This is useful on large timesharing
systems where a PS command can cause the system to grind to a halt.  The
ability to get the information isn't diminished for those who really need the
additional detail (administrators.)  Normal users won't see any difference unless
the processes are swapped out.  The "really get it mode" is invoked by the
use of an additional flag in the command string "-f".  New/old behavior is
selectable with a compile option.

PR:		5196
Submitted by:	Matt Dillon <dillon@best.net>
1997-12-05 07:33:40 +00:00
Julian Elischer
52bf64c787 Reviewed by: hackers@freebsd.org in general
Obtained from: Whistle Communications tree

Add an option to the way UFS works dependent on the SUID bit of directories
This changes makes things a whole lot simpler on systems running as
fileservers for PCs and MACS. to enable the new code you must
1/ enable option SUIDDIR on the kernel.
2/ mount the filesystem with option suiddir.
hopefully this makes it difficult enough for people to
do this accidentally.
see the new chmod(2) man page for detailed info.
1997-11-13 00:28:51 +00:00
John Polstra
c351e0897e Document the exit status for a command that was terminated by a
signal.
1997-11-12 04:32:50 +00:00
Joerg Wunsch
1898febe2d Sort "sparse" into alphabetical order, since dd's `conv' options need
to be sorted.  This temporarily broke the "osync" option.
1997-11-11 20:35:29 +00:00
Bruce Evans
28701136f7 Fixed some type and value mismatches. setsignal() returned a bogusly
cast value that was always ignored.  Rev.1.9 of trap.c made this
more bogus by returning a semantically different value after calling
siginterrupt().  Avoid these problems by not returning a value.
1997-11-10 11:32:24 +00:00
Andrey A. Chernov
8dd81503df 1) Fix longstanding bug:
trap 'echo xxx' 1 2 3 15
	read x
is not interrupted by ^C (due to restartable read syscall) and must be
interrupted per POSIX
Worse case:
	read -t 5 x
hangs forever after ^C pressed (supposed to timeout after 5 secs)
Fixed by adding siginterrupt(signo, 1) after catch handler installed

2) Do not reinstall sighandler immediately after it is called,
BSD do it for us
1997-11-05 23:33:58 +00:00
Wolfgang Helbig
af6ff02816 Synchronize usage() and man page.
Pointed out by bde.
1997-10-26 10:33:02 +00:00
Joerg Wunsch
80214f046b Style police: keep a variable list in alphabetical order, and add
pointless paren's to return statements.

Nitpicked by:	bde :)
1997-10-13 09:36:05 +00:00
Joerg Wunsch
b8904f2acb Make df(1) exit with non-success status if something went wrong.
PR:		bin/4415
1997-10-12 13:55:43 +00:00
Joerg Wunsch
4ddfeabd8f Teach dd(1) about an option to write sparse files. Can be useful for
things like diskless clients' swap files etc.

Submitted by:	pascal@zuo.dec.com (Pascal Pederiva) (ages ago, with many
						  stylistic changes by me)
1997-10-11 20:09:05 +00:00
Eivind Eklund
f8ce2ec95f Un-clobber mktemp->mkstemp patch. 1997-10-09 11:05:16 +00:00
Eivind Eklund
73db7d72c8 Add <sys/errno.h> 1997-10-09 10:50:54 +00:00
Eivind Eklund
ad0b1f1ac3 make signal handlers errno safe
Obtained from:	OpenBSD (file rev 1.11) - Theo de Raadt <deraadt@openbsd.org>
1997-10-08 14:47:56 +00:00
Eivind Eklund
af6ab81d43 mktemp -> mkstemp
Obtained from: OpenBSD (file rev 1.4 by Theo de Raadt <deraadt@openbsd.org>)
1997-10-08 13:46:39 +00:00
Eivind Eklund
bd6b64117b make signal handlers errno safe
Obtained from:	OpenBSD (file rev 1.5) Theo de Raadt <deraadt@openbsd.org>
1997-10-08 12:59:14 +00:00
Eivind Eklund
4c33974251 Slightly improved fix compared to my insiration
don't munge argv strings -- copy them first. avoids 'w' showing:
    deraadt  p8 zeus.theos.com    8:26AM     3 dd if of bs

Obtained from:	OpenBSD (file rev 1.3) by Theo de Raadt <deraadt@openbsd.org>
1997-10-08 12:10:33 +00:00
Eivind Eklund
186741ecdb save errno in sigchld handler
Obtained from:	Theo deRaadt <theo@openbsd.org> (OpenBSD rev 1.6)
1997-10-07 16:43:16 +00:00
Eivind Eklund
ea3a01d31d vsprintf -> vnsprintf paranoia.
Obtained from:	Todd Miller <millert@openbsd.org> (OpenBSD rev 1.3)
1997-10-07 16:33:22 +00:00
Eivind Eklund
13a71f5d9b Don't honor $HOME if >= MAXPATHLEN
Obtained from:	Todd Miller <millert@openbsd.org> (OpenBSD csh.c rev 1.3 and 1.4)
1997-10-07 16:27:48 +00:00
Jordan K. Hubbard
97fe7f477f Changes to support full make parallelism (-j<n>) in the world
target.
Reviewed by:	<many different folks>
Submitted by:	Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>
1997-10-05 09:40:24 +00:00
Wolfram Schneider
ae691257b7 mv(1) is too silent if used with the option -i. It should
print which input mv(1) expect (y/n) and print a warning if the
file was not overwritten.
1997-10-04 13:02:06 +00:00
Wolfram Schneider
ab215c6703 cp(1) is too silent if used with the option -i. It should
print which input cp(1) expect (y/n) and print a warning if the
file was not overwritten.
1997-10-03 18:11:14 +00:00
Wolfram Schneider
f50f7e1e32 Change example from US to international standard date notation. 1997-10-03 18:09:17 +00:00
Daniel O'Callaghan
c5c1c13516 Back out suppress '\n' mod. 1997-10-03 12:54:30 +00:00
Daniel O'Callaghan
34de7199ea Add the '-s' flag to the usage string. 1997-10-01 05:44:35 +00:00
Daniel O'Callaghan
70a53cd743 Add the ability to supress the '\n' at the end of the date printed. 1997-10-01 05:24:08 +00:00
Joerg Wunsch
adb7f7bca7 Fix the broken `date HHMM.SS' handling.
PR:		bin/4661
Submitted by:	blank@sliphost37.uni-trier.de (Sascha Blank)
1997-09-30 20:06:15 +00:00
Mike Smith
afa53c8df7 Add the '-t timeout' option to the 'read' builtin. This allows the
'read' command to return an error if the user fails to supply any
input withink a given time period.  The behaviour of this option is
similar to that of the like-named option in ksh93.

Reviewed by:	joerg
1997-09-29 15:15:16 +00:00
Wolfram Schneider
fee9ad97d6 Endless loop.
$ touch from to
$ echo -n loop | mv -i from to
overwrite to?
^C
1997-09-28 10:41:40 +00:00
Mark Murray
8a7ad3adf7 Change to use the new KTH Kerberos.
Also make -Wall a bit quieter.
1997-09-28 08:32:59 +00:00
Philippe Charnier
34384756cd environmental -> environment. 1997-09-18 06:55:21 +00:00
Sean Eric Fagan
51f26ac519 Fix sorting of directories when doing '-d'.
PR:		bin/4558
Submitted by:	Keith Bostic
1997-09-18 06:42:27 +00:00
Wolfram Schneider
c7a197e1d8 PR: docs/4449
The -c flag is not documented in the sh(1) manapge.

Submitted by: adrian@virginia.edu
1997-09-13 17:40:00 +00:00
Wolfram Schneider
f6b31571f6 spelling corrections.
PR: docs/4450
Submitted by: josh@quick.net
1997-09-13 16:01:53 +00:00
Jordan K. Hubbard
f9fc03961c This command doesn't need to be setuid root, it's only asking
for potential trouble.
Reviewed by:	security officers.
Noted by:	OpenBSD
1997-09-12 15:00:06 +00:00
John-Mark Gurney
e3d79adaba fix misspelling
Submitted-by: Josh Gilliam

Closes PR:4427
1997-08-30 11:09:26 +00:00
John-Mark Gurney
81cd6abb0a fix misspelling
Submitted-by: Josh Gilliam

Closes PR:4425
1997-08-30 11:06:35 +00:00
Søren Schmidt
a885d9dcf9 Dont have an internal function named "warn" it clashes with libc..
Needed for ELF.
1997-08-29 16:12:30 +00:00
Bruce Evans
18f368f2e4 Restored clobbered parts of rev.1.15 (build intermediate object files
for tools).
1997-08-25 19:50:01 +00:00
Steve Price
b74ad5265d Correct confusing error message when called as 'stty -sane'.
PR:		bin/3573
1997-08-24 00:26:12 +00:00
Jonathan Lemon
d623c5c11e Disallow empty arguments (eg: '') as process ids.
PR:		2631
Submitted by:	Arne Henrik Juul <arnej@imf.unit.no>
1997-08-21 21:34:43 +00:00
Jonathan Lemon
7d4774d0ab Document correct option in manual page.
PR:		3769
Submitted by:	johnp@lodgenet.com
1997-08-19 21:52:07 +00:00
Jonathan Lemon
af041bf3fd Pad the input buffer whenever sync is used, not just if the noerror flag
is also set.
Change osync to not to tack on an empty block if the input buffer is null,
    or an even multiple of the blocksize.
Also change osync to pad the output with nulls/spaces depending whether
   this is a block-oriented conversion or not (same as sync).

PR:		3818
1997-08-19 19:46:18 +00:00
Brian Somers
7fedb877a4 Hint at how to use TZ.
Submitted by:	grog@lemis.com
1997-08-18 20:27:17 +00:00
Steve Price
ead152eb86 Make all status values an integral type and use
pid_t when referring to process IDs.
1997-08-18 02:53:20 +00:00
Steve Price
6ad175c69e Use -I${.CURDIR}/../../sys so that the path is relative
to the source code directory.

Submitted by:	bde
1997-08-13 17:35:00 +00:00
Andrey A. Chernov
a264029085 Describe signals behaviour now 1997-08-12 21:20:12 +00:00
Steve Price
c1cee2f62b Oops, add #include's (forgotten in last commit) to make this
compile again.
1997-08-11 02:41:02 +00:00
Steve Price
be73b9df4d Use -I../../sys instead of -I/sys. 1997-08-11 02:36:09 +00:00
Steve Price
aeb7f2b6d3 Remove #ifdef NEWVM code and remove extra "key.name = p" line. 1997-08-11 02:35:16 +00:00
Steve Price
e27525d9f8 Fix seg fault when invalid keywords are used.
PR:		bin/4253
Submitted by:	Jesse Rosenstock <jmr@ugcs.caltech.edu>
1997-08-11 02:29:50 +00:00
Brian Somers
233d16da02 Remove forgotten debug statement. 1997-08-10 16:37:33 +00:00
Brian Somers
86a3e2a13a Add "-f fmt date" for specification of the
date using strptime(3).
Suggested by: Michael Smith <msmith@atrad.adelaide.edu.au>

Change mm & dd to MM & DD so that they don't
clash with the month.
1997-08-10 16:36:59 +00:00
Brian Somers
698f86e401 Change [-DMHW [+|-]val] to [-v [+|-]val[ymwdHM]]
Support Hours & Minutes
Add -Wall to Makefile
1997-08-09 22:34:06 +00:00
Steve Price
880fdc3dd9 More minor nits (mostly using memove instead of memcpy). 1997-08-08 00:54:05 +00:00
Steve Price
242fa23c9c More $@ -> ${.TARGET} that I missed earlier. 1997-08-08 00:49:25 +00:00
Steve Price
bc4b855161 Observe precedence set by Philippe Charnier when adding an
rcsid.
1997-08-07 22:33:01 +00:00
Steve Price
febad2fcf4 Observe precedence set by Phillippe Charnier in adding an
rcsid.
1997-08-07 22:28:25 +00:00
Steve Price
380fdd7d7e Changes include: sccsid -> rcsid, bcopy -> memcpy, don't use the
register keyword, and -Wall cleaning.

Obtained from: similar changes in NetBSD
1997-08-07 21:42:17 +00:00
Steve Price
395f4bf0be Remove remaining Lite1 stuff from the man page and uphold the
precedence in changing sccsid to rcsid as set by Phillippe
Charnier in his previous 100 or so commits.

pointed out by: Bruce Evans <bde@zeta.org.au>
1997-08-07 21:37:39 +00:00
Steve Price
5967604a1e sccsid -> rcsid and fix some minor nits. 1997-08-07 21:33:47 +00:00
Steve Price
16cc192af1 Add Bruce's _NEW_VFSCONF flag to make this compile cleanly and
sccsid -> rcsid.
1997-08-07 21:31:00 +00:00
Steve Price
ab1733642c #include <err.h> for err(3) call and replace extern reference to errno
with #include <errno.h>.
1997-08-07 15:41:51 +00:00
Steve Price
41cc862cc2 Remove #if(n)def BSD_4_4_LITE cruft and change sccsid to rcsid. 1997-08-07 15:37:47 +00:00
Steve Price
d46c1a60d3 Remove #if(n)def BSD_4_4_LITE cruft and sccsid -> rcsid. 1997-08-07 15:33:50 +00:00
Brian Somers
7ca215a690 Add [-DWMY] flags for date adjustment.
Discussed with: freebsd-hackers
1997-08-04 03:37:07 +00:00
Peter Wemm
e410bf2331 Fix "lstart". (Displays "19" rather than time)
PR: 4206
Submitted by: Tetsuya Furukawa <tetsuya@secom-sis.co.jp>
1997-08-03 08:33:17 +00:00
Peter Wemm
940cca66e2 Kill #ifndef NEWVM etc. It affected a lot of other things besides
VM structure (eg: credentials etc) and it's highly unlikely we'll ever
get to see the "tainted" BSD<=4.3 VM code in public use.  Although it
indicated the way some things used to be done, it obfuscates things too
much.
1997-08-03 08:25:01 +00:00
Bruce Evans
76b9a919c0 devname.c moved to libc before Lite1 and isn't in ps in Lite2. 1997-07-13 07:43:41 +00:00
Bruce Evans
0e63ce04b1 Bury this properly. 1997-07-01 21:38:49 +00:00
Bruce Evans
d9d6b4846b Import this unwanted file from Lite-original so that it doesn't
get imported with Lite2 (there was only one missing file in src/bin,
other than tags files and obj links).
1997-07-01 21:34:30 +00:00
Philippe Charnier
41e964cb5d Remove lines inside #ifdef 0/#endif. 1997-06-30 11:10:18 +00:00
Paul Traina
72b4ef7179 NOSHARED takes a yes/YES no/NO value, not "true, false, hey mon!".
NOPIC is used to not generate a shared library, not NOSHARED.
Make NOSHARED advisory where appropriate.
Remove bogus NOSHARED (kbdio).
1997-06-29 06:03:42 +00:00
Philippe Charnier
601fc2b92f Document the use of `ls -lo' to see flags.
Obtained from: OpenBSD.
1997-06-24 06:57:11 +00:00
Jordan K. Hubbard
f2d0ae8518 Back out previous fix - this bug's got diplomatic immunity as a registered
political issue.
1997-06-19 17:57:06 +00:00
Jordan K. Hubbard
fc0eef9f89 >Number: 3780
>Category:       bin
>Synopsis:       WEXITSTATUS() may return nagative value, which causes sh to generate bad $?

PR:		3780
Submitted by:	sanewo@ba2.so-net.or.jp
1997-06-19 15:14:01 +00:00
John Polstra
904058d0ad Try again to explain the existence of lchown() and the absence of
lchmod() and lutimes().
1997-06-19 01:07:05 +00:00
John Polstra
b91ba2181a Update some text to reflect the fact that symbolic links now have
owner and group attributes.
1997-06-14 18:44:03 +00:00
Andrey A. Chernov
ea1376dfbb Now [^abc] means the same as [!abc] like bash and *csh already does 1997-06-06 23:04:33 +00:00
Philippe Charnier
3e23dae445 Typo in usage string. Looks like the man page now. 1997-06-06 06:48:35 +00:00
Philippe Charnier
ba858c2631 Err(3) was locally defined (for portability reasons). Use #ifdef 0/#endif
to hide this so libc is kept instead.
1997-06-06 06:46:27 +00:00
Philippe Charnier
43d30a79be Correct usage string. Man page don't reflect reality for now. 1997-06-06 06:43:19 +00:00
Philippe Charnier
749d4bb649 Cosmetic change in usage string. 1997-06-06 06:40:06 +00:00